SA-MP Forums Archive
Gang permissions - 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: Gang permissions (/showthread.php?tid=277368)



Gang permissions - James_Bourne - 17.08.2011

Hello,
I've got Stevo's SF CnR well, Cyber helped me to do a gang but i want to put permissions on it like /adarmy if it doesnt have /adarmy it can't use that class and that class is law enforcement class i want it to be like civillians. I've got dcmd system.


Re: Gang permissions - ElieJabbour - 17.08.2011

I Didn't understand what you basically need, You want /adarmy that only gangs can use it ? or cops ?


AW: Gang permissions - Forbidden - 17.08.2011

No ,I think he want such like if someone want to joins the Team ,the admin should type /adarmy and his ID,
Well,
Use your gloabel varbiable ,or the single variable in the enum ,and use sscanf for the command.


Re: Gang permissions - James_Bourne - 17.08.2011

Elie what i mean is that if u select class if u see like a gang name grove you spawn it spawns but i want it that if u do /adgrove id will give him permissions to be that gang if u dont have /adgrove by admin u can't use it it shall say You do not have permission to use this class.


Re: Gang permissions - ElieJabbour - 17.08.2011

Post your /adarmy code here, please


Re: Gang permissions - James_Bourne - 17.08.2011

its nothing wrong with /adarmy omg just nevermind its no help please someone post here who can help. Let me just ask cyber tommorow -_- none of u guys helping.


Re: Gang permissions - KingTurtle - 17.08.2011

Quote:
Originally Posted by James_Bourne
Посмотреть сообщение
its nothing wrong with /adarmy omg just nevermind its no help please someone post here who can help. Let me just ask cyber tommorow -_- none of u guys helping.
Jeez. You already went mad after 1 hour. You need to EXPLAIN it
Use something like
pawn Код:
if(gTeam[playerid] == TEAM_ARMY)
{
    // (things army can do)
    return 1;
}
Add at /adarmy something like

pawn Код:
gTeam[targetid] = TEAM_ARMY;
Save all the stuff in his usefile.

For the gTeam thing, you can view the whole code here


Re: Gang permissions - James_Bourne - 17.08.2011

KingTurtle i already did that jeez do you guys have a brain look at my 2nd post in this thread.

Let me explain again?:
1.When i login i see ATEAM blue like a law enforcement.
2.I can use it even without /adateam
3.It shall be that you can't use it if u dont have been /adateam id .
4.if u do not have been /adateam by a admin it shall say hmm
5.You do not have permissions to use this class and etc
6.and this shall be like criminal.
7.I tried to make the color of name and gangzone to lime but its blue omg i setted it to lime.
8. i adde the commands but it says the law enforcements command.


Re: Gang permissions - ElieJabbour - 17.08.2011

Quote:
Originally Posted by KingTurtle
Посмотреть сообщение
Jeez. You already went mad after 1 hour. You need to EXPLAIN it
Use something like
pawn Код:
if(gTeam[playerid] == TEAM_ARMY)
{
    // (things army can do)
    return 1;
}
Add at /adarmy something like

pawn Код:
gTeam[targetid] = TEAM_ARMY;
Save all the stuff in his usefile.

For the gTeam thing, you can view the whole code here
That's what i meant, he just need one line to add to the /adarmy thing, and he won't send the code so i can re-send it with it added.