Need help: if(gTeam[playerid]
#1

Hello i need a kind of help. What is the code for if(gTeam[playerid] to this code


PHP код:
CMD:fbilocker(playeridparams[])
{
        if(
IsPlayerInRangeOfPoint(playerid3.0223.5103,186.9165,1003.0313,358.4842))
ShowPlayerDialog(playerid,1500,DIALOG_STYLE_LIST,"FBI LOCKER","Weapons\nSkins\nArmour/Pills""OK","CANCEL");
return 
1;

So only the FBI team can use this command?
Reply
#2

pawn Код:
CMD:fbilocker(playerid, params[])
{
    if(IsPlayerInRangeOfPoint(playerid, 3.0, 223.5103,186.9165,1003.0313,358.4842))
    {
        if(gTeam[playerid] == TEAM_FBI) ShowPlayerDialog(playerid,1500,DIALOG_STYLE_LIST,"FBI LOCKER","Weapons\nSkins\nArmour/Pills", "OK","CANCEL");
        else return SendClientMessage(playerid, -1, "ERROR: Only FBI agents can use this command!");
    }
    return 1;
}
Reply
#3

Thanks but the text are not comming then i use /fbilocker on another team?
Reply
#4

Its comming but i need to stay in the point. How can i do it so i not will need to stay in the point and the text will come up?
Reply
#5

remove isplayerinrengeofpoint
Like this:

pawn Код:
CMD:fbilocker(playerid, params[])
{

        if(gTeam[playerid] == TEAM_FBI) ShowPlayerDialog(playerid,1500,DIALOG_STYLE_LIST,"FBI LOCKER","Weapons\nSkins\nArmour/Pills", "OK","CANCEL");
        else return SendClientMessage(playerid, -1, "ERROR: Only FBI agents can use this command!");
    }
    return 1;
}
Reply
#6

CMD:fbilocker(playerid, params[])
{
if(IsPlayerInRangeOfPoint(playerid, 3.0, 223.5103,186.9165,1003.0313,358.4842))
{
if(gTeam[playerid] == TEAM_SWAT || gTeam[playerid] == TEAM_ARMY)
{
ShowPlayerDialog(playerid,1500,DIALOG_STYLE_LIST," FBI LOCKER","Weapons\nSkins\nArmour/Pills", "OK","CANCEL");
return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)