24.08.2010, 06:18
Quote:
Sorry for Duble Post
But Here It Is: Frist We Need Define Team (Just Name For Team Nubmer) so (we can have more then 1 team) Код:
#define TEAM_COP 1 //under includes Код:
new pMember[MAX_PLAYERS]; //under defines you need to decide how player gonna join team for example when he choses class of policeman in class selection, by command or whatever you want but which ever you chose you put Код:
pMember[playerid] = TEAM_COP; then you can make command for that team only Код:
if (strcmp("/command",cmdtext,true,) == 7) { if (pMember[playerid] == TEAM_COP) { //something happening } else SendClientMessage(playerid,COLOR,"You need to be policeman to use this command."); return 1; } Код:
if (pMember[playerid] == TEAM_COP) and if not he is told that he can't use this command also i put there COLOR and that is your color you chose for message do it by Код:
#define COLOR 0x000000AA //white (i think so) Well i Hope You Understand This Time But If Not Try Looking HERE pMember is same as gTeam in this tutorial |
Thanks for all the help.