05.01.2019, 11:57
what could be the problem , when the player dies, it doubles the players money
tried it without the user.priesmirti enum but still gives double money
PHP код:
public OnPlayerDeath(playerid, killerid, reason)
{
user.priesmirti[playerid] = GetPlayerMoney(playerid);
GivePlayerMoney(playerid, -GetPlayerMoney(playerid));
SetTimerEx("mire", 3000, false,"i", playerid);
return 1;
}
PHP код:
public mire(playerid)
{
GivePlayerMoney(playerid, user.priesmirti[playerid]);
user.priesmirti[playerid] = 0;
SetPlayerPos(playerid, -2664.7725,635.7092,14.4531);
return 1;
}