Help with this 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: Help with this command! (
/showthread.php?tid=122700)
Help with this command! -
Lorenc_ - 23.01.2010
Well firstly i got this command from samp wiki
pawn Код:
dcmd_heal(playerid, params[])
{
new id;
if (sscanf(params, "u", id)) SendClientMessage(playerid, 0xFF0000AA, "Usage: \"/heal <playerid>\"");
else if (id == INVALID_PLAYER_ID) SendClientMessage(playerid, 0xFF0000AA, "Player not found");
else
{
SetPlayerHealth(id, 100.0);
SendClientMessage(id, 0x00FF00AA, "You have been healed");
SendClientMessage(playerid, 0x00FF00AA, "Player healed");
}
return 1;
}
I want to make this command work if you are in the medics team..
I'm using gteam for this!
Re: Help with this command! -
llama - 23.01.2010
pawn Код:
dcmd_heal(playerid, params[])
{
new id;
if (sscanf(params, "u", id)) SendClientMessage(playerid, 0xFF0000AA, "Usage: \"/heal <playerid>\"");
else if (id == INVALID_PLAYER_ID) SendClientMessage(playerid, 0xFF0000AA, "Player not found");
else if (gTeam[playerid] != Team_Medic) SendClientMessage(playerid, 0xFF0000AA, "You must be a medic!");
else
{
SetPlayerHealth(id, 100.0);
SendClientMessage(id, 0x00FF00AA, "You have been healed");
SendClientMessage(playerid, 0x00FF00AA, "Player healed");
}
return 1;
}
Simply change "Team_Medic" to whatever you have it set to.
Re: Help with this command! -
Lorenc_ - 23.01.2010
Quote:
Originally Posted by llama
Simply change "Team_Medic" to whatever you have it set to.
|
Could you show me a example of what you mean?
Re: Help with this command! -
llama - 23.01.2010
It's simply whatever you have the Team_Medic variable set to.
Like for example: TEAM_MEDIC, Team_Medic, Medic, MEDIC, etc.
Re: Help with this command! -
Lorenc_ - 23.01.2010
Idk i dont get you....
could someone help me put a function to make it allow for the medics team only?
Re: Help with this command! -
llama - 23.01.2010
You use gTeam, yes?
This link should help you:
https://sampwiki.blast.hk/wiki/PAWN_tuto...eam_deathmatch