SA-MP Forums Archive
Help with duel - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Help with duel (/showthread.php?tid=122593)



Help with duel - Aram555 - 22.01.2010

When I die not of the contender.
It would be necessary that duel was cancelled

In public so:

Код:
public OnPlayerDeath(playerid, killerid, reason)
{
new killername[MAX_PLAYER_NAME],playername[MAX_PLAYER_NAME],string[256];
GetPlayerName(killerid, killername, sizeof(killername));
GetPlayerName(playerid, playername, sizeof(playername));
if(call[playerid] == 1 && call[killerid] == 1 && duelstart == 1)
{
SpawnPlayer(killerid);
call[playerid] = 0,call[killerid] = 0,duelstart = 0;
format(string, sizeof(string), "You have won duel with%s",playername);
SendClientMessage(killerid,COLOR_blue, string);
format(string, sizeof(string), " You have lost in duel with %s",killername);
SendClientMessage(playerid,COLOR_blue, string);
format(string, sizeof(string), " %s Has won duel with %s",killername,playername);
SendClientMessageToAll(COLOR_blue, string);
}
return 0;