Code:
public OnPlayerDeath(playerid, killerid, reason)
if(uduelu[playerid] == 1 && uduelu[killerid] == 1)
{
GivePlayerMoney(killerid, 2*Ulog);
new Float:Health, Float:Armour, string[128];
GetPlayerArmour(killerid, Armour);
GetPlayerHealth(killerid, Health);
format(string, sizeof(string), "{ff0000}[DUEL] %s(%d) {ffffff}je pobjedio %s(%d) i ostalo mu je %.2f HP %.2f ARMOR", PlayerName(killerid), killerid, PlayerName(playerid), playerid, Health, Armour);
SendClientMessageToAll(-1, string);
SetPlayerPos(playerid,1727.7881,-1667.6744,22.6094);
SetPlayerPos(killerid,1727.7881,-1667.6744,22.6094);
SetPlayerInterior(killerid, 18);
SetPlayerInterior(playerid, 18);
ResetPlayerWeapons(playerid);
ResetPlayerWeapons(killerid);
SpawnPlayer(killerid);
new str[128];
format(str, sizeof(str), "{ff0000}[DUEL]: {ffffff}Pobjedio si %s(%d) i osvojio $%d", PlayerName(playerid), playerid, Ulog);
SCM(killerid, -1, str);
tijek = 0;
uduelu[playerid] = 0;
uduelu[killerid] = 0;
KillTimer(DUEL_TIMER);
if(killerid != INVALID_PLAYER_ID)
{
SetPlayerScore(killerid, GetPlayerScore(killerid)+1);
GivePlayerMoney(killerid, 300);
SendClientMessage(killerid, -1, "Congratulation!You have gained 300$ and +1 score.");
GivePlayerMoney(playerid, -100);
SendClientMessage(playerid, -1, "You lost 100$ because you got killed.");
}
return 1;
}
And its not work, when i kill someone i dont get +1 score, please help :)