18.10.2011, 20:06
I'm having trouble with a script where if a player has a barrel with them that they would lose it if they died or disconnected I am not sure how to do this can someone help me please?
Код:
public OnPlayerEnterCheckpoint(playerid) { GivePlayerMoney(playerid, 10000); DisablePlayerCheckpoint(playerid); new name[MAX_PLAYER_NAME], string[44]; GetPlayerName(playerid, name, sizeof(name)); format(string, sizeof(string), "%s has delivered a barrel.",name); SendClientMessageToAll(0xFFFF00AA, string); return 1; }
Код:
public OnPlayerPickUpPickup(playerid, pickupid) { if(pickupid == pickup1) SetPlayerCheckpoint(playerid, 1982.6150, -220.6680, -0.2432, 3.0); new name[MAX_PLAYER_NAME], string[44]; GetPlayerName(playerid, name, sizeof(name)); format(string, sizeof(string), "%s has found a barrel.",name); SendClientMessageToAll(0xFFFF00AA, string); return 1; }