How to...
#1

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..
Reply
#2

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
}
Reply
#3

can u plz explain more

Код:
new LaVice;
is already there..so can u plz give the code becuz i'm a noob..
Reply
#4

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.
Reply
#5

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)