Fast and Litlle help
#1

Hello ALL samp players.
I need a litlle help.
I saw the people using pMember, and i idk how to use it.
Don't say to edit and see a RP gm, because this don't help.
I need know how to make a pMember COP, if can.
Thanks, and helpme please.
Reply
#2

pMember is an var
so
on top of your script there will be
Код:
#define TEAM_COP 1         //define one of groups (each of them with difrent number best)

new pMember[MAX_PLAYERS];  //var that stores which player is in which group (or anything you want)
then you can put that after something happening
Код:
pMember[playerid] = TEAM_COP
and player will be set to that team
and then
Код:
if (pMember[playerid] == TEAM_COP)
{
//something happening 
return 1;
}
under some command or anythin you want

i hope you understand bit more about it :]
Reply
#3

hmm didn't understand
Reply
#4

i will rewrite this for you in more clear way (dunno if there is one xD) and add few more informations just give me some time
Reply
#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
#6

Quote:
Originally Posted by Nekrus2
Посмотреть сообщение
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
And more one question, you know how yo make a /invite for pMember cop?
Thanks for all the help.
Reply
#7

can? pls
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)