not allowed to use command..
#1

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 ?
Reply
#2

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

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!"
Reply
#4

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
Reply
#5

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)