SA-MP Forums Archive
auto-crack system. - 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: auto-crack system. (/showthread.php?tid=275889)



auto-crack system. - Darnell - 11.08.2011

I want to make that if a player has 20 health or lower, he'll automaticly apply to the animation crack.
I couldn't understand how to use GetPlayerHealth with ' if '.



Re: auto-crack system. - MadeMan - 11.08.2011

https://sampwiki.blast.hk/wiki/GetPlayerHealth


Re: auto-crack system. - Darnell - 11.08.2011

Not helping...


Re: auto-crack system. - SchurmanCQC - 11.08.2011

Quote:
Originally Posted by Darnell
Посмотреть сообщение
Not helping...
There's an example in the wiki that should help...


Re: auto-crack system. - Darnell - 11.08.2011

I've asked for a auto-crack system.
From the example on wiki, that's what I understood so far :
pawn Код:
new Float:health;
    GetPlayerHealth(playerid,health)
    if(health < 20.0)
    {
    ApplyAnimation(playerid,"PED","crckdeth2",4.1,1,1,1,1,1,1);
    }
I don't know if it's correct, is it ?


Re: auto-crack system. - MadeMan - 11.08.2011

Quote:
Originally Posted by Darnell
Посмотреть сообщение
I've asked for a auto-crack system.
https://sampforum.blast.hk/showthread.php?tid=187229


Re: auto-crack system. - Darnell - 11.08.2011

Well, can you help me with the code I wrote above ?


Re: auto-crack system. - MadeMan - 11.08.2011

Quote:
Originally Posted by Darnell
Посмотреть сообщение
From the example on wiki, that's what I understood so far :
pawn Код:
new Float:health;
    GetPlayerHealth(playerid,health)
    if(health < 20.0)
    {
    ApplyAnimation(playerid,"PED","crckdeth2",4.1,1,1,1,1,1,1);
    }
I don't know if it's correct, is it ?
It is.


Re: auto-crack system. - Darnell - 11.08.2011

Where should I put it so it'll work ?


Re: auto-crack system. - Darnell - 11.08.2011

Anyone ?