SA-MP Forums Archive
Need help: if(gTeam[playerid] - 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)
+--- Thread: Need help: if(gTeam[playerid] (/showthread.php?tid=431668)



Need help: if(gTeam[playerid] - canip - 19.04.2013

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?


Re: Need help: if(gTeam[playerid] - [XST]O_x - 19.04.2013

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;
}



Re: Need help: if(gTeam[playerid] - canip - 19.04.2013

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


Re: Need help: if(gTeam[playerid] - canip - 19.04.2013

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?


Re: Need help: if(gTeam[playerid] - kalanerik99 - 19.04.2013

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;
}



Re: Need help: if(gTeam[playerid] - z3r0w1zard - 19.04.2013

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;
}