09.07.2010, 16:07
I'm having a problem with pickups. I'm trying to make it so when a person goes over a weapon pickup (Tec9 and Sawnoff) It gives them the amount of ammo I say.
It's not working though
It doesn't give the amount i want it to.
It's not working though
![Sad](images/smilies/sad.gif)
pawn Код:
new FightClubHealth;
new FightClubArmour;
new FightClubTec9;
new FightClubSawnoff;
FightClubHealth = CreatePickup(1240, 2, -1038.4342,1025.6862,1343.2644, -1);
FightClubArmour = CreatePickup(1242, 2, -1067.6223,1088.3184,1346.5283, -1);
FightClubTec9 = CreatePickup(372, 2, -1018.3204,1063.2198,1343.0958, -1);
FightClubSawnoff = CreatePickup(350, 2, -1044.2113,1094.0320,1346.4677, -1);
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == FightClubHealth){
SetPlayerHealth(playerid,100.0);
return 1;
}
if(pickupid == FightClubArmour){
SetPlayerArmour(playerid,100.0);
return 1;
}
if(pickupid == FightClubTec9){
GivePlayerWeapon(playerid,32, 960);
return 1;
}
if(pickupid == FightClubSawnoff){
GivePlayerWeapon(playerid,26, 202);
return 1;
}
return 1;
}