help -
reddoxx - 10.11.2017
i want help with this locker command
Код:
COMMAND:locker(playerid, params[])
{
if(PlayerInfo[playerid][pFaction] != 2) return SCM(playerid, COLOR_LIGHTRED, "Nem vagy rendvйdelmi szerv tagja.");
if(IsPlayerInRangeOfPoint(playerid, 6.0, 2074.8101,-1719.7982,13.5469,195.8301) || PlayerInfo[playerid][pFaction] == 2)
{
ShowPlayerDialog(playerid, DIALOG_LOCKER, DIALOG_STYLE_LIST, "LSPD", "Golyубllу mellйny\nGumibot\nPaprikaspray\nDesert Eagle\nShotgun\nMP5\nM4\nSniper\nTazer\nRuhбzat", "Vбlaszt", "Bezбr");
}
if(IsPlayerInRangeOfPoint(playerid, 6.0, 2074.8101,-1719.7982,13.5469,195.8301) || PlayerInfo[playerid][pFaction] == 6)
{
ShowPlayerDialog(playerid, DIALOG_SDLOCKER, DIALOG_STYLE_LIST, "SASD", "Golyубllу mellйny\nGumibot\nPaprikaspray\nDesert Eagle\nShotgun\nMP5\nM4\nSniper\nTazer\nRuhбzat", "Vбlaszt", "Bezбr");
}
else return SCM(playerid, COLOR_LIGHTRED, "Nem vagy a szekrйnyek kцzelйben!");
return 1;
}
when i compile this command, i can't use, i got an error message in game
Код:
"if(PlayerInfo[playerid][pFaction] != 2) return SCM(playerid, COLOR_LIGHTRED, "Nem vagy rendvйdelmi szerv tagja.");"
when i remove this line
Код:
"if(PlayerInfo[playerid][pFaction] != 2) return SCM(playerid, COLOR_LIGHTRED, "Nem vagy rendvйdelmi szerv tagja.");"
, i use everywhere the command.
like, the position is in the lspd hq, and i can use the command in my house.
Re: help -
R4nd4ll - 10.11.2017
Woah woah
Use [ code ] and [ /code ] I cant read shit man
Re: help -
reddoxx - 10.11.2017
thread fixed
Re: help -
reddoxx - 10.11.2017
i try to fix the command, but i not have good results.
Re: help -
zMason - 10.11.2017
You restrict players from using the command if they're not faction 2, so this line can never be true: || PlayerInfo[playerid][pFaction] == 6
I would do it like this:
Код:
COMMAND:locker(playerid, params[])
{
if(IsPlayerInRangeOfPoint(playerid, 6.0, 2074.8101,-1719.7982,13.5469,195.8301) && PlayerInfo[playerid][pFaction] == 2)
{
ShowPlayerDialog(playerid, DIALOG_LOCKER, DIALOG_STYLE_LIST, "LSPD", "Golyубllу mellйny\nGumibot\nPaprikaspray\nDesert Eagle\nShotgun\nMP5\nM4\nSniper\nTazer\nRuhбzat", "Vбlaszt", "Bezбr");
return 1;
}
if(IsPlayerInRangeOfPoint(playerid, 6.0, 2074.8101,-1719.7982,13.5469,195.8301) && PlayerInfo[playerid][pFaction] == 6)
{
ShowPlayerDialog(playerid, DIALOG_SDLOCKER, DIALOG_STYLE_LIST, "SASD", "Golyубllу mellйny\nGumibot\nPaprikaspray\nDesert Eagle\nShotgun\nMP5\nM4\nSniper\nTazer\nRuhбzat", "Vбlaszt", "Bezбr");
return 1;
}
SCM(playerid, COLOR_LIGHTRED, "Nem vagy a szekrйnyek kцzelйben!");
return 1;
}