SA-MP Forums Archive
How To Make Heal command? - 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 To Make Heal command? (/showthread.php?tid=237324)



How To Make Heal command? - Roomeo - 09.03.2011

Hello
I just wanted To Know how to make /heal Command e.g

pawn Код:
if (strcmp)("/Medkit", cmdtext, true, 7) == 0)
  // here i want to check if player have 1000$ then he can use this command if he have 1000$ get the Cash and setplayer health to 100 and if he don't have SendMessage you don't have 1000$ to use Medkit
can someone do it?


Re: How To Make Heal command? - Stigg - 09.03.2011

Quote:
Originally Posted by Roomeo
Посмотреть сообщение
Hello
I just wanted To Know how to make /heal Command e.g

pawn Код:
if (strcmp)("/Medkit", cmdtext, true, 7) == 0)
  // here i want to check if player have 1000$ then he can use this command if he have 1000$ get the Cash and setplayer health to 100 and if he don't have SendMessage you don't have 1000$ to use Medkit
can someone do it?
https://sampwiki.blast.hk/wiki/SetPlayerHealth


Re: How To Make Heal command? - Roomeo - 09.03.2011

lol i know this i want he can use /medkit only if he have 1000


Re: How To Make Heal command? - Stigg - 09.03.2011

That with:

Код:
GivePlayerMoney(playerid, -1000);



Re: How To Make Heal command? - Roomeo - 09.03.2011

if he have 0 it will be -1000 then i want if he don't have 1000 then he can't use it Damn try to understand :P


Re: How To Make Heal command? - Stigg - 09.03.2011

There. Help yourself.

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


Re: How To Make Heal command? - Markx - 09.03.2011

pawn Код:
if (strcmp)("/Medkit", cmdtext, true, 7) == 0)
{
if(GetPlayerMoney(playerid) < 1000) return SendClientMessage(playerid, COLOR_RED, "ERROR : You dont have enough money!");
{
GivePlayerMoney(playerid, -1000);
SetPlayerHealth(playerid,100);
}
return 1;
}



Re: How To Make Heal command? - Roomeo - 09.03.2011

lol you copied it xD "ERROR : You need to have 100 000$ to be Level 2!");
Anyways Thanks


Re: How To Make Heal command? - Markx - 09.03.2011

nope, thats my script.

I got Level 2 command