A Problem with a command
#3

Quote:
Originally Posted by Ciandlah
Посмотреть сообщение
Try this code, hopefully it works
You know that > 0 is the exact same as >= 1 right?


EDIT:

It's this:
pawn Код:
if(PlayerInfo[playerid][pHelper]< 1 && PlayerInfo[playerid][pAdmin] < 1)
    {
        NewbieTimer[playerid] = 15;
    }
    if(PlayerInfo[playerid][pHelper] >= 1 && PlayerInfo[playerid][pAdmin] < 1)
    {
        NewbieTimer[playerid] = 5;
    }
    if(IsAdmin(playerid))
    {
        NewbieTimer[playerid] = 0;
    }
    if(NewbieTimer[playerid] > 0)
    {
        format(string, sizeof(string), "You must wait %d seconds before using this channel again.", NewbieTimer[playerid]);
        SendClientMessageEx(playerid, COLOR_GREY, string);
        return 1;
    }
- You're setting the newbie timer before it even checks if the newbie timer is above what it should be.

::
pawn Код:
if(NewbieTimer[playerid] > 0)
    {
        format(string, sizeof(string), "You must wait %d seconds before using this channel again.", NewbieTimer[playerid]);
        SendClientMessageEx(playerid, COLOR_GREY, string);
        return 1;
    }
    if(PlayerInfo[playerid][pHelper]< 1 && PlayerInfo[playerid][pAdmin] < 1)
    {
        NewbieTimer[playerid] = 15;
    }
    if(PlayerInfo[playerid][pHelper] >= 1 && PlayerInfo[playerid][pAdmin] < 1)
    {
        NewbieTimer[playerid] = 5;
    }
    if(IsAdmin(playerid))
    {
        NewbieTimer[playerid] = 0;
    }
Reply


Messages In This Thread
A Problem with a command - by Drago987 - 31.05.2014, 01:37
Re: A Problem with a command - by Ciandlah - 31.05.2014, 04:15
Re: A Problem with a command - by Dubya - 31.05.2014, 04:17
Re: A Problem with a command - by Threshold - 31.05.2014, 10:02
Re: A Problem with a command - by Aerotactics - 31.05.2014, 11:19
Re: A Problem with a command - by Eth - 31.05.2014, 11:23
Re: A Problem with a command - by Drago987 - 31.05.2014, 12:22
Re: A Problem with a command - by Threshold - 31.05.2014, 14:05
Re: A Problem with a command - by Drago987 - 31.05.2014, 15:32
Re: A Problem with a command - by Drago987 - 31.05.2014, 19:09

Forum Jump:


Users browsing this thread: 2 Guest(s)