SA-MP Forums Archive
not allowed to use command.. - 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: not allowed to use command.. (/showthread.php?tid=591602)



not allowed to use command.. - IndependentGaming - 14.10.2015

hello, i got a command


CMD:houseedit(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 1338 && PlayerInfo[playerid][pHouseModerator] >= 1)


if im admin 1338 or higher i can use it, but if im a HouseModerator it says you are not allowed to use this command how is that ? if i change the && to || got the same problem


ps there is just 1 housemoderator level can i change the >= to == 1 ?


Re: not allowed to use command.. - Sawalha - 14.10.2015

if it's only one value for housemoderator variable why do you use >= then? try ==


Re: not allowed to use command.. - IndependentGaming - 14.10.2015

Alright i will try that
what about this command you need atleast be level 1 VIP to use this command:


CMD:vshop(playerid, params[])
{
if(PlayerInfo[playerid][pDonateRank] >= 1)
{
SendClientMessageEx(playerid, COLOR_GRAD2, " You must be a VIP to use this command!");
return 1;
}


But when i set my vip to 1 or higher, it saying the text you see there "You must be a VIP to use this command!"


Re: not allowed to use command.. - jlalt - 14.10.2015

PHP код:
CMD:vshop(playeridparams[])
{
if(
PlayerInfo[playerid][pDonateRank] >= 1) {
// your code here like:
 
SendClientMessageEx(playeridCOLOR_GRAD2" Hey Dude!");
} else return 
SendClientMessageEx(playeridCOLOR_GRAD2" You must be a VIP to use this command!");
return 
1;

you have to use else to check if player ain't have vip 1 or above


Re: not allowed to use command.. - bgedition - 14.10.2015

First you need to search and if and only if you didn't find a solution, you may post here.
Take a look at this
https://sampwiki.blast.hk/wiki/Control_Structures#Operators