Smail help +Rep
#28

Quote:
Originally Posted by UltraScripter
Посмотреть сообщение
pawn Код:
if(PlayerInfo[playerid][pRank] => 2)  if(PlayerInfo[playerid][pRank] =< 8)
{

}
This is not how you add checks
pawn Код:
if(PlayerInfo[playerid][pRank] => 2 && PlayerInfo[playerid][pRank] =< 8) {}
To have two or more checks you just need to add the conditional statement inside the brackets () and seperate each with OR or AND gates.

AND gate is &&
OR gate is ||

Quote:
Originally Posted by astanalol
Посмотреть сообщение
this line 1306 and 1307
PHP код:
    } else SendClientMessage(playerid, -1"Sorry , you are not admin");
    return 
1
all cmd
PHP код:
CMD:setrank(playeridparams[])
{
    new 
str[128], ARanklookupid;
    if(
PlayerInfo[playerid][pRank] >= && PlayerInfo[playerid][pRank] <= 8)
    {
        if(
sscanf(params"ui"lookupidARank)) return SendClientMessage(playerid, -1"Usage: /setrank <PlayerID/PlayerName> <Rank>");
        
format(strsizeof(str), "Admin %s (ID:%d) has setted %s (ID:%d) Rank to (%d)",GetName(playerid), playeridGetName(lookupid), lookupidARank);
        
SendClientMessageToAll(-1str);
        
PlayerInfo[lookupid][pRank] = ARank;
    }
    } else 
SendClientMessage(playerid, -1"Sorry , you are not admin");
    return 
1;

You have extra closing bracket }
Reply


Messages In This Thread
Smail help +Rep - by astanalol - 22.12.2014, 23:56
Re: Smail help +Rep - by UltraScripter - 23.12.2014, 00:13
Re: Smail help +Rep - by astanalol - 23.12.2014, 00:14
Re: Smail help +Rep - by UltraScripter - 23.12.2014, 00:15
Re: Smail help +Rep - by astanalol - 23.12.2014, 00:18
Re: Smail help +Rep - by UltraScripter - 23.12.2014, 00:19
Re: Smail help +Rep - by astanalol - 23.12.2014, 00:26
Re: Smail help +Rep - by UltraScripter - 23.12.2014, 00:30
Re: Smail help +Rep - by Sew_Sumi - 23.12.2014, 00:39
Re: Smail help +Rep - by 1fret - 23.12.2014, 00:40
Re: Smail help +Rep - by UltraScripter - 23.12.2014, 00:42
Re: Smail help +Rep - by astanalol - 23.12.2014, 00:42
Re: Smail help +Rep - by 1fret - 23.12.2014, 00:46
Re: Smail help +Rep - by Sew_Sumi - 23.12.2014, 00:48
Re: Smail help +Rep - by UltraScripter - 23.12.2014, 00:50
Re: Smail help +Rep - by 1fret - 23.12.2014, 00:52
Re: Smail help +Rep - by Sew_Sumi - 23.12.2014, 00:53
Re: Smail help +Rep - by astanalol - 23.12.2014, 00:55
Re: Smail help +Rep - by UltraScripter - 23.12.2014, 00:57
Re: Smail help +Rep - by 1fret - 23.12.2014, 00:59
Re: Smail help +Rep - by Sew_Sumi - 23.12.2014, 00:59
Re: Smail help +Rep - by JuanStone - 23.12.2014, 01:00
Re: Smail help +Rep - by Sew_Sumi - 23.12.2014, 01:01
Re: Smail help +Rep - by Abagail - 23.12.2014, 01:02
Re: Smail help +Rep - by Sew_Sumi - 23.12.2014, 01:26
Re: Smail help +Rep - by Abagail - 23.12.2014, 02:15
Re: Smail help +Rep - by Sew_Sumi - 23.12.2014, 02:28
Re: Smail help +Rep - by Kaperstone - 23.12.2014, 11:33
Re: Smail help +Rep - by Ox1gEN - 23.12.2014, 12:29
Re: Smail help +Rep - by Glossy42O - 23.12.2014, 12:33
Re: Smail help +Rep - by astanalol - 23.12.2014, 13:25
Re: Smail help +Rep - by astanalol - 23.12.2014, 13:27
Re: Smail help +Rep - by Sew_Sumi - 23.12.2014, 14:22
Re: Smail help +Rep - by zT KiNgKoNg - 23.12.2014, 14:35
Re: Smail help +Rep - by Write - 23.12.2014, 15:20
Re: Smail help +Rep - by Sew_Sumi - 23.12.2014, 21:46

Forum Jump:


Users browsing this thread: 7 Guest(s)