Why is this not working?
#4

please show the decalaration of NewbieHelper[playerid]
and debug it using printf as below and tell what is printing on log

PHP код:
if(strcmp(cmd"/newbie"true) == || strcmp(cmd"/n"true) == 0)
    {
        
if(!
PlayerInfo[playerid][pAdmin])
        {
            if(
PlayerInfo[playerid][pNewbieBanned])
                return 
SendClientMessage(playeridCOLOR_GRAD2" You are banned from using the newbie chat.");
        }
        
strmid(tmp,cmdtext,idx,strlen(cmdtext));
        if(
stringContainsIP(tmp))
            return 
SendClientMessage(playeridCOLOR_RED"you cant adversite ip's here!");
        if(!
strlen(tmp))
            return 
SendClientMessage(playeridCOLOR_GRAD2""COL_SZR"Usage:"COL_WHITE" (/n)ewbie [newbie chat]");
        
// format string according to level and broadcas
        
printf("[debug]newbie[playerid] = %d",NewbieHelper[playerid]);//hope that its a digit not boolean cause look down for more info
switch(NewbieHelper[playerid])
        {
            case 
1format(stringsizeof(string), "** Helper %s:%s **",RemoveUnderScore(playerid),tmp);
            case 
2: {
                    if(
PlayerInfo[playerid][pAdmin] & ADMIN_STEALTH)
                        
format(stringsizeof(string), "** Helper %s:%s **",RemoveUnderScore(playerid),tmp);
                    else
                        
format(stringsizeof(string), "** Moderator %s:%s **",RemoveUnderScore(playerid),tmp);
                }
            case 
3: {
                    if(
PlayerInfo[playerid][pAdmin] & ADMIN_STEALTH)
                        
format(stringsizeof(string), "** Helper %s:%s **",RemoveUnderScore(playerid),tmp);
                    else
                        
format(stringsizeof(string), "** Admin %s:%s **",RemoveUnderScore(playerid),tmp);
                }
            case 
4: {
                    if(
PlayerInfo[playerid][pLevel] >= && !NewbieHelper[playerid])
                        
format(stringsizeof(string), "** Player %s:%s **",RemoveUnderScore(playerid),tmp);
                    else
                        
format(stringsizeof(string), "** Player %s:%s **",RemoveUnderScore(playerid),tmp);
                }
            default: 
format(stringsizeof(string), "** Newbie %s:%s **",RemoveUnderScore(playerid),tmp);
        }
        
SendClientMessageToAll(COLOR_LIGHTGREEN,string);
        return 
1;
    } 
Reply


Messages In This Thread
Why is this not working? - by MayaEU - 03.07.2016, 13:19
Re: Why is this not working? - by MayaEU - 03.07.2016, 13:51
Re: Why is this not working? - by Dayrion - 03.07.2016, 14:24
Re: Why is this not working? - by SyS - 03.07.2016, 14:26
Re: Why is this not working? - by MayaEU - 03.07.2016, 14:28
Re: Why is this not working? - by Dayrion - 03.07.2016, 14:30
Re: Why is this not working? - by SyS - 03.07.2016, 14:31
Re: Why is this not working? - by MayaEU - 03.07.2016, 14:31
Re: Why is this not working? - by SyS - 03.07.2016, 14:33
Re: Why is this not working? - by MayaEU - 03.07.2016, 14:52

Forum Jump:


Users browsing this thread: 1 Guest(s)