Acceptdeath problem onplayerupdate - 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: Acceptdeath problem onplayerupdate (
/showthread.php?tid=188718)
Acceptdeath problem onplayerupdate -
joeri55 - 08.11.2010
I got this problem with onplayerupdate
This is my onplayerupdate:
http://pastebin.com/JBB0T5TJ
Now I want that when people are below 5 or hp 5 /crack and toggleplayer 0.
I used the isplayertied for it but the player doesn't /crack when he / she is below 5 hp..
Can anyone help me?
This is my /acceptdeath
Код:
if(strcmp(cmd, "/acceptdeath", true) == 0)
{
if(PlayerTied[giveplayerid] == 1)
{
if(PlayerTied[giveplayerid] == 1)
{
PlayerTied[giveplayerid] = 0;
SetPlayerHealth(playerid, 0.0);
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, " You ain't wounded !");
return 1;
}
}
return 1;
}
Everything complies good..
Re: Acceptdeath problem onplayerupdate -
Mike_Peterson - 08.11.2010
onplayerupdate u got
Код:
PlayerTied[giveplayerid] = 1;
replace it with
Код:
PlayerTied[playerid] = 1;
Re: Acceptdeath problem onplayerupdate -
joeri55 - 08.11.2010
Thanks, but still it doesn't toggle the player?
Re: Acceptdeath problem onplayerupdate -
joeri55 - 08.11.2010
Fixed it I needed to put if(health < 10) incase of if(health == 10.0)