23.03.2012, 18:20
try this
pawn Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == parachute[0] || pickupid == parachute[1] || pickupid == parachute[2] || pickupid == parachute[3] || pickupid == parachute[4])
{
GivePlayerWeapon(playerid,46,1);
return 1;
}
if(pickupid == clinfo && (COP[playerid] || ShitInfo[playerid][openCar] == 1)) // Casino Elevator information
{
GameTextForPlayer(playerid,"~g~/clift - ~w~to call lift~n~~g~/liftup - ~w~to go up~n~~g~/liftdown - ~w~to go down ~n~~g~/liftstop - ~w~to stop lift",10000,5);
}
if(pickupid == parkouricon[playerid])
{
if(GetPlayerJobID(playerid) != 10) return scm(playerid,c_r,"( ! ) This icon its not for you !");
new rand = random(4);
switch(rand)
{
case 0:
{
GivePlayerMilk(playerid,1);
scm(playerid,COLOR_GREEN,"( ! ) You receive 1 Milk in your /foodstock !");
}
case 1:
{
GivePlayerBeer(playerid,1);
scm(playerid,COLOR_GREEN,"( ! ) You receive 1 Beer in your /foodstock !");
}
case 2:
{
GivePlayerFish(playerid,1);
scm(playerid,COLOR_GREEN,"( ! ) You receive 1 Fish in your /foodstock !");
}
case 3:
{
if(FindPlayerBagSpace(playerid) == 10) return scm(playerid,c_r,"( ! ) Your bag is full and you lost extra bonus by icon !");
Bags[playerid][FindPlayerBagSpace(playerid)] = 1;
scm(playerid,COLOR_GREEN,"( ! ) You receive 1 Cheque +10 GCash in your bag !");
}
DestroyPickup(parkouricon[playerid]);
}
}
return 1;
}