[Help] How to set up dying
#4

Код:
public OnPlayerDeath(playerid, killerid, reason)
{
	new string[64];
	GivePlayerMoney(playerid, -1000);
	GivePlayerMoney(playerid, 1000);
	format(string, sizeof(string), "KILL: You were killed by %s.", killerid);
	SendClientMessage(playerid, COLOR_RED, string);
	format(string, sizeof(string), "KILL: %s was killed by %s.",playerid,killerid);
	SendClientMessageToAll(COLOR_RED, string);
	if(killerid != INVALID_PLAYER_ID) SetPlayerScore(killerid, GetPlayerScore(killerid) + 1);
	if(playerid != INVALID_PLAYER_ID) SetPlayerScore(playerid, GetPlayerScore(killerid) - 1);
	return 1;
}
Reply


Messages In This Thread
[Help] How to set up dying - by zouyun - 13.06.2011, 21:33
Re: [Help] How to set up dying - by zouyun - 14.06.2011, 21:33
Re: [Help] How to set up dying - by park4bmx - 14.06.2011, 21:51
Re: [Help] How to set up dying - by zouyun - 14.06.2011, 22:39
Re: [Help] How to set up dying - by grand.Theft.Otto - 14.06.2011, 22:42
Re: [Help] How to set up dying - by zouyun - 14.06.2011, 22:47
Re: [Help] How to set up dying - by Gazmull - 15.06.2011, 03:48
Re: [Help] How to set up dying - by Kwarde - 15.06.2011, 04:12

Forum Jump:


Users browsing this thread: 2 Guest(s)