24.05.2013, 20:35
pawn Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == m4[ 0 ] || m4[ 1 ] || m4[ 2 ] || m4[ 3 ])
{
GameTextForPlayer(playerid, "~n~~n~~n~~n~~w~~h~m4!", 2500, 6);
GivePlayerWeapon(playerid, 31, 20);
}
else if(pickupid == Rocket)
{
GameTextForPlayer(playerid, "~n~~n~~n~~n~~w~~h~Rocket launcher!", 2500, 6);
GivePlayerWeapon(playerid, 35, 3);
}
else if(pickupid == Spaz[ 0 ] || Spaz[ 1 ])
{
GameTextForPlayer(playerid, "~n~~n~~n~~n~~w~~h~Spaz12!", 2500, 6);
GivePlayerWeapon(playerid, 27, 20);
}
else if(pickupid == Tec9[ 0 ] || Tec9[ 1 ] || Tec9[ 2 ])
{
GameTextForPlayer(playerid, "~n~~n~~n~~n~~w~~h~Tec9!", 2500, 6);
GivePlayerWeapon(playerid, 32, 20);
}
else if(pickupid == Shotgun[ 0 ] || Shotgun[ 1 ] )
{
GameTextForPlayer(playerid, "~n~~n~~n~~n~~w~~h~Shotgun!", 2500, 6);
GivePlayerWeapon(playerid, 25, 25);
}
else if(pickupid == sniper[ 0 ] || sniper[ 1 ] || sniper[ 2 ])
{
GameTextForPlayer(playerid, "~n~~n~~n~~n~~w~~h~Sniper!", 2500, 6);
GivePlayerWeapon(playerid, 34, 10);
}
else if(pickupid == Desert[ 0 ] || Desert[ 1 ])
{
GameTextForPlayer(playerid, "~n~~n~~n~~n~~w~~h~Desert!", 2500, 6);
GivePlayerWeapon(playerid, 24, 13);
}
else if(pickupid == Uzi[ 0 ] || Uzi[ 1 ])
{
GameTextForPlayer(playerid, "~n~~n~~n~~n~~w~~h~Uzi!", 2500, 6);
GivePlayerWeapon(playerid, 28, 50);
}
else if(pickupid == Ah[ 0 ] || Ah[ 1 ])
{
if(Ah[ 0 ]) return GameTextForPlayer(playerid, "~n~~n~~n~~n~~w~~h~Health pack!", 2500, 6);
if(Ah[ 1 ]) return GameTextForPlayer(playerid, "~n~~n~~n~~n~~w~~h~Armour pack!", 2500, 6);
ahpicked[ playerid ][ 0 ] = true;
ahpicked[ playerid ][ 1 ] = true;
}
return 1;
}