How to... - 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: How to... (
/showthread.php?tid=276727)
How to... -
Mr.Anonymous - 15.08.2011
hey all i want to make a cmd so that a gang member could get their weapons....like gang La Vice...but only gang member...not regular people or admins...hope u help me..
Re: How to... -
=WoR=Varth - 15.08.2011
You can simply make an if statement to check if player is gang member with variable. f.e:
pawn Код:
if(yourgang[playerid] == blahblahblah)
{
//Give them weapon
}
Re: How to... -
Mr.Anonymous - 15.08.2011
can u plz explain more
is already there..so can u plz give the code becuz i'm a noob..
Re: How to... -
grand.Theft.Otto - 15.08.2011
pawn Код:
// top of script
new IsLaVice[MAX_PLAYERS];
// in the function where it detects the player is a gang member, like your /joingang command for example
IsLaVice[playerid] = 1;
// in your /gangweapon command or something
if(IsLaVice[playerid] == 1)
{
// give their weapons here
// other stuff
return 1;
}
else
{
return SendClientMessage(playerid,color,"You aren't a gang member.");
}
Something like that.
Re: How to... - Deskoft - 15.08.2011
I also suggest you use YSI_Groups, as another guy told me on *******, 'use YSI unless you want to re-invent the wheel'. YSI_Groups allows you to manage groups in a easy and dynamic way, without wasting your time with this kind of variables.
You can find YSI_Groups here