06.09.2012, 16:53
I need help. Is it possible to GivePlayerMoney and show GameTextForPlayer ONLY for players who picks the Pickup except the Victim or his own Tombstone.
I mean, If I killed myself or killed by someone and then If I picked my own Tombstone then show nothing and don't give money. So people would not abuse killing themselves just to make money.
If someone pick the tombstone (except me) then destroy the tombstone +give him $400.
I mean, If I killed myself or killed by someone and then If I picked my own Tombstone then show nothing and don't give money. So people would not abuse killing themselves just to make money.
If someone pick the tombstone (except me) then destroy the tombstone +give him $400.
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;
}