Allowing tazers for a specific family -
Dasoz - 21.10.2011
So I'm working on my server and I would like to have my own Homeland security, so i would make a family for it. Now, i want them to be able to use tazers like police officers (/tazer)
How would I do that?
Something like "(playerinfo[playerid][fMember]==" ?
If i want it to for example allow only family number 2 to use this, how would i do it?
Re: Allowing tazers for a specific family -
wups - 21.10.2011
Depends on your PlayerInfo structure.
Show us the line, where you set the players family.
Re: Allowing tazers for a specific family -
Dasoz - 21.10.2011
I'm quite new to this, can you try to help explain what you mean exactly by that? Maybe give me a small example.
Re: Allowing tazers for a specific family -
wups - 21.10.2011
find the command where you set a playersfamily, and copy it here.
Does this family ALREADY have any commands, that only they can do? If so copy them here(you can find them by searching for the error message for ex. "You're not part of the COP FAMILY" Don't forget that it's different in every script).
Re: Allowing tazers for a specific family -
Dasoz - 21.10.2011
Quote:
Originally Posted by wups
find the command where you set a playersfamily, and copy it here.
Does this family ALREADY have any commands, that only they can do? If so copy them here(you can find them by searching for the error message for ex. "You're not part of the COP FAMILY" Don't forget that it's different in every script).
|
It looks something like this:
Код:
CMD:tazer(playerid, params[])
{
if(gTeam[playerid] == 2 || IsACop(playerid)
I'm just trying to learn, so i use different gamemodes

So i really appreciate your time
Re: Allowing tazers for a specific family -
wups - 21.10.2011
pawn Код:
CMD:tazer(playerid, params[])
{
if(gTeam[playerid] != 2 && !IsACop(playerid)) return SendClientMessage(playerid,RED," You're not a cop");
// tazer script here.
return 1;
}
If you don't understand some part - reply again.
Re: Allowing tazers for a specific family -
Dasoz - 21.10.2011
Well it was kinda what i was looking for, i have the one that looks if you're a cop or not. But I would like to allow a family to use the /tazer command