Exeption in Commands - 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: Exeption in Commands (
/showthread.php?tid=278132)
Exeption in Commands -
ServerScripter - 20.08.2011
hi i would creat a commands (/health) only for a Team and This team can health only 2 teams if he health the third Team a message sayed to him : you can not do that.
i know u don't understand what i sayed but:
there are 3 teams:
#define TEAM_HUMAN 1
#define TEAM_ARMY 3
#define TEAM_MEDIC 4
"TEAM_ARMY" can health TEAM_HUMAN but can't health TEAM_MEDIC
the command is /health it set HP to 100
Re: Exeption in Commands -
James_Bourne - 20.08.2011
maybe u change role of them and maybe you change places of them.
Re: Exeption in Commands -
Machida - 20.08.2011
new TIMES = 0; // outside the health function
/health function:
if(TIMES < 3){
// Your code + :
}else {
// SendMessage... "You can only use 2 times" or w.e
}
TIMES++;
You probably will need to declare "TIMES" for each team or something
Re: Exeption in Commands -
ServerScripter - 20.08.2011
Quote:
Originally Posted by Machida
new TIMES = 0; // outside the health function
/health function:
if(TIMES < 3){
// Your code + :
}else {
// SendMessage... "You can only use 2 times" or w.e
}
TIMES++;
You probably will need to declare "TIMES" for each team or something
|
ok but i need a complete code...
changement in the roles:
i say to you what i want :
if a TEAM_ARMY Member do /health [ID] , he can health only Two Teams :
TEAM_HUMAN and TEAM_ARMY
and whene i do /health to TEAM_MEDIC and TEAM_ZOMBIE , it say to him you can't heal Enmys or someehting...
Please i need a Full script i will never forgot if you help me..