How To Make Heal command?
#1

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?
Reply
#2

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
Reply
#3

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

That with:

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

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
Reply
#6

There. Help yourself.

https://sampwiki.blast.hk/wiki/GetPlayerMoney
Reply
#7

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;
}
Reply
#8

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

nope, thats my script.

I got Level 2 command
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)