Fast and Litlle help
#5

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
then we need varble for team so we will use pMember
Код:
new pMember[MAX_PLAYERS]; //under defines
when we got those things we can start looking for seting player into team

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;
and that sets player to Police Team

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;
}
so
Код:
if (pMember[playerid] == TEAM_COP)
checks if the player is in that team or not
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)
on bottom of the other define (you can change COLOR to WHITE for example)



Well i Hope You Understand This Time But If Not
Try Looking HERE
pMember is same as gTeam in this tutorial
Reply


Messages In This Thread
Fast and Litlle help - by Thebest96 - 23.08.2010, 19:38
Re: Fast and Litlle help - by Nekrus2 - 23.08.2010, 19:54
Re: Fast and Litlle help - by Thebest96 - 23.08.2010, 21:23
Re: Fast and Litlle help - by Nekrus2 - 23.08.2010, 22:08
Re: Fast and Litlle help - by Nekrus2 - 23.08.2010, 22:44
Re: Fast and Litlle help - by Thebest96 - 24.08.2010, 06:18
Re: Fast and Litlle help - by Thebest96 - 24.08.2010, 09:25

Forum Jump:


Users browsing this thread: 2 Guest(s)