Need help putting together a /heal command.
#1

Ok, I am making a medic team for my server and I want to medics to be able to use
a /heal command. I have posted this in another post and someone gave me this:

Код:
if(GetPlayerSkin(playerid) != 165)
{
   SendClientMessage(playerid, //color here, "You Are Not A Paramedic!");
   return 1;
}
else 
{
   SetPlayerHealth(id, 100.0);
   SendClientMessage(playerid, //color here, "You have been healed by a paramedic");
}
}
return 1;
}
Anyone know how to fit the /heal command its self in there?
(So medics can heal other people besides them selfs?)
And by the way, the command only lets a certain skin use it,
so I just used skin id 165 for this post. Thanks.

WOET, IF YOU ANSWER AND LOCK THIS TOPIC SAYING SOMETHING LIKE, "WHY DID YOU ALREADY POST THIS?"
WELL, FYI, LAST POST WAS LOCKED AND I DIDN'T UNDERSTAND HOW TO MAKE IT STILL. AND YES, THIS TIME I POSTED IN
THE CORRECT FORMAT.
Reply
#2

Код:
	if(strcmp(cmd, "/heal", true) == 0)
{
if(GetPlayerSkin(playerid) != 165)
{
   SendClientMessage(playerid, //color here, "You Are Not A Paramedic!");
   return 1;
}
else 
{
   SetPlayerHealth(id, 100.0);
   SendClientMessage(playerid, //color here, "You have been healed by a paramedic");
}
}
return 1;
}
There
Reply
#3

I'll do it for you, but i need to know what command processing method you are using (are u using dcmd, zcmd, strcmp..?)
And also how do you identify whether the player is a medic - What variable do you use (e.g TEAM_MEDIC). Better to use this than use skins.
Reply
#4

Quote:
Originally Posted by [B2K
Hustler ]
I'll do it for you, but i need to know what command processing method you are using (are u using dcmd, zcmd, strcmp..?)
And also how do you identify whether the player is a medic - What variable do you use (e.g TEAM_MEDIC). Better to use this than use skins.
Thanks anyway, someone fixed it for me. By the way I now know how to set it as team, I may stick to skins for a while though.
I appreciate your feedback though
Reply
#5

Quote:
Originally Posted by retart441
Код:
	if(strcmp(cmd, "/heal", true) == 0)
{
if(GetPlayerSkin(playerid) != 165)
{
  SendClientMessage(playerid, //color here, "You Are Not A Paramedic!");
  return 1;
}
else 
{
  SetPlayerHealth(id, 100.0);
  SendClientMessage(playerid, //color here, "You have been healed by a paramedic");
}
}
return 1;
}
There
THANK YOU! THIS WORKS PERFECTLY!
Reply
#6

Quote:
Originally Posted by [B2K
Hustler ]
I'll do it for you, but i need to know what command processing method you are using (are u using dcmd, zcmd, strcmp..?)
And also how do you identify whether the player is a medic - What variable do you use (e.g TEAM_MEDIC). Better to use this than use skins.
[B2K]Hustler, I can you make the command in a filterscript for me..? I have changed my mind and skins are NOT working.
If you can still make it, please reply to this post. Thanks.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)