08.09.2012, 11:39
Could anyone tell me how to edit this to. If I pick up the cuffin it disappear on my screen, but when someone pick it up it doesn't destroy on their screen but they can pick it up. How do other player destroy the pickup object after they pick it up??
pawn Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(pickupid == tombstonePickups[i])
{
new tombstring[MAX_PLAYER_NAME+20];
GetPlayerName(i,tombstring,MAX_PLAYER_NAME);
strins(tombstring, "~g~+$400 ~n~~r~Coffin of:~n~~w~", 0);
GameTextForPlayer(playerid,tombstring,3000,3);
DestroyPickup(tombstonePickups[playerid]);
tombstonePickups[playerid] = -1;
GivePlayerMoney(playerid, 400);
break;
}
}
return 1;
}