1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
|
init()
{
// kA wie die strings heißen..
// kannst Du testen mit:
//
// items = getEntArray();
// for( i = 0 ; i < items.size ; i++ )
// iPrintLn( "targetname: " + items[ i ].targetname );
items = getEntArray( "panzerschreck_mp" , "targetname" );
for( i = 0 ; i < items.size ; i++ )
{
item = items[ i ];
item thread panzerschreck_trigger();
}
}
panzerschreck_trigger()
{
self waittill( "trigger" , player ); // ka wie der String hieß, glaube es war "trigger"...
if( !isDefined( player ) )
return;
weaponSlotName = undefined; // siehe: http://wiki.modsrepository.com/index.php?title=Call_of_Duty_4:_Scripting_Reference_-_Player::GetWeaponSlotWeapon
if( player getWeaponSlotWeapon( "primary" ) != "panzerschreck_mp" )
weaponSlotName = "primary";
else if( player getWeaponSlotWeapon( "primaryb" ) != "panzerschreck_mp" )
weaponSlotName = "primaryb";
else
return;
player setWeaponAmmoClipSize( weaponSlotName , 1 );
} |