12.09.2012, 16:07
Thanks to crashplugin! This cause the server to restart.. What could be the problem here?
pawn Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(pickupid == tombstonePickups[i] && i != playerid)
{
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[i]); //Since you want to remove the coffin of the player that is dead, you'll have to place 'i' and not 'playerid'
tombstonePickups[i] = -1; // Same for here
GivePlayerMoney(playerid, 400);
break;
}
}
return 1;
}