Advertisements
#6

pawn Код:
new adtimer = 0;

forward ADTimer();
public ADTimer()
{
    adtimer = 0;
    return 1;
}
And then you check the variable in the cmd:
pawn Код:
CMD:ad(playerid, params[])
{
    if(adtimer == 0)
    {
        if(isnull(params)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /ad [chat]");
        {
            new s[100];
            format(s,sizeof(s), "Advertisement: %s, Name: %s, Ph: %s", params, GetName(playerid), PlayerInfo[playerid][pPhone]);
            SendClientMessageToAll(COLOR_GREEN, s);
            adtimer = 1;
            SetTimer("ADTimer", 60000, 0);
        }
    }
    else
    {
        SendClientMessage(playerid, 0xFF0000FF, "You must wait 60 seconds before advertise something!");
    }
    return 1;
}
Reply


Messages In This Thread
Advertisements - by Da_Noob - 23.01.2013, 14:06
Re: Advertisements - by LarzI - 23.01.2013, 14:11
Re: Advertisements - by theomanking - 23.01.2013, 14:11
Re: Advertisements - by Da_Noob - 23.01.2013, 14:18
Re: Advertisements - by Xbowman - 23.01.2013, 14:46
Re: Advertisements - by DiGiTaL_AnGeL - 23.01.2013, 14:56

Forum Jump:


Users browsing this thread: 1 Guest(s)