A little problem; - 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: A little problem; (
/showthread.php?tid=585566)
A little problem; -
Aleksabre - 15.08.2015
Код:
if(newkeys & KEY_SECONDARY_ATTACK)
{
if(IsPlayerInRangeOfPoint(playerid, 2.0, 1999.0267,-1993.7751,17.0041))
{
if(GetPlayerSkin(playerid)!=284 | 283) return SendClientMessage(playerid, COLOR_RED,"Error: {1E90FF}Nisi saobracajac.");
ShowPlayerDialog(playerid, 2, DIALOG_STYLE_LIST, "{1E90FF}Policija:", "Health\nArmour\nArmour + Kevlar\nPendrek\nSmoke Bomb\nDesert Eagle\nShotgun\nMP5\nM4a1\nSniper", "Ok!", "Cancel");
}
}
the code;
Код:
if(GetPlayerSkin(playerid)!=284 | 283) return SendClientMessage(playerid, COLOR_RED,"Error: {1E90FF}Nisi saobracajac.");
If I'm in 284 or 283 skin, it still says error, but if I remove one and just let like only one skin(284) for example; it works;
how should I change "!=284 | 283) to make to both things work the dialog of weapons?
Re: A little problem; -
X337 - 15.08.2015
Код:
if(GetPlayerSkin(playerid)!=284 || GetPlayerSkin(playerid)!=283) return SendClientMessage(playerid, COLOR_RED,"Error: {1E90FF}Nisi saobracajac.");
Re: A little problem; -
Aleksabre - 15.08.2015
It did not give any error when compiling, but it still says Error: Nisi policajac which means you're not a cop but w/e, it doesn't let me take weapons
Re: A little problem; -
X337 - 15.08.2015
Sorry, use this
Код:
if(GetPlayerSkin(playerid)!=284 && GetPlayerSkin(playerid)!=283) return SendClientMessage(playerid, COLOR_RED,"Error: {1E90FF}Nisi saobracajac.");
Re: A little problem; -
Aleksabre - 15.08.2015
Thank you.
![Smiley](images/smilies/smile.png)
Now I will know in the future what would be the problem and how it can be solved.
Reputation added. Thank you again