How would i do this? - 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: How would i do this? (
/showthread.php?tid=271943)
How would i do this? -
Shockey HD - 26.07.2011
Im looking for kind of the GetPlayerHealth
Код:
new Float:HP;
GetPlayerHealth(playerid, HP);
SetPlayerHealth(playerid, HP+75);
But i need it for like bring drunk how would i do that?
Re: How would i do this? -
TouR - 26.07.2011
Make clear what you wanna do. I cant understand you..
Re: How would i do this? -
RowdyrideR - 26.07.2011
Код:
if (strcmp("/heal", cmdtext, true, 10) == 0)
{
new HP;
HP = GetPlayerHealth(playerid);
SetPlayerHealth(playerid, (HP)+30);
return 1;
}
i guess like this
Re: How would i do this? -
RowdyrideR - 26.07.2011
Код:
if(strcmp(cmdtext, "/doctor", true) == 0)
{
new Float:health;
GetPlayerHealth(playerid,health);
SetPlayerHealth(playerid, (health)+10.0);
ApplyAnimation(playerid,"PED","WALK_DRUNK",4.1,1,1,1,1,1);
return 1;
}

!?!?!?
Re: How would i do this? -
Shockey HD - 26.07.2011
Quote:
Originally Posted by tour15
Make clear what you wanna do. I cant understand you..
|
It seems pretty clear if you understood what
Код:
new Float:HP;
GetPlayerHealth(playerid, HP);
SetPlayerHealth(playerid, HP+75);
Does lol
Re: How would i do this? -
Shockey HD - 26.07.2011
Quote:
Originally Posted by RowdyrideR
Код:
if(strcmp(cmdtext, "/doctor", true) == 0)
{
new Float:health;
GetPlayerHealth(playerid,health);
SetPlayerHealth(playerid, (health)+10.0);
ApplyAnimation(playerid,"PED","WALK_DRUNK",4.1,1,1,1,1,1);
return 1;
}
 !?!?!?
|
No, thats not what i wanted, nevermind
Re: How would i do this? -
iggy1 - 26.07.2011
You haven't been realy clear. I think your looking for this.
https://sampwiki.blast.hk/wiki/SetPlayerDrunkLevel
Might be wrong though because your not being clear enough.
Re: How would i do this? -
Shockey HD - 26.07.2011
Quote:
Originally Posted by iggy1
|
No i got it, if you knew what the code does (it checks if you have less HP) then it will add more, i dont know if DrunkLevel does that by itself