ongamemodeinit ?
#1

i got this timer - but i want it in my gamemode... when the game starts

i dont want to do /countdown

can anybody help me please.. thank you

pawn Код:
#include <a_samp>

new Count;

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print("CountDown System By SilverKiller Loaded!");
    print("--------------------------------------\n");
    Count = 0;
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/countdown", cmdtext, true, 10) == 0)
    {
        if (Count == 0)
        {
        SetTimer("Counting",1000,false);
        }else{
        SendClientMessage(playerid, 0xFF0000FF,"There is a countdown already started!");
        }
        new pName[24];
        new str[128];
        GetPlayerName(playerid, pName, 24);
        format(str, 128, "%s has started the countdown!", pName);
        SendClientMessageToAll(0xFF9900AA, str);
        return 1;
    }
    return 0;
}

forward Counting(playerid);
forward Counting2(playerid);
forward Counting1(playerid);
forward CountingGO(playerid);
public Counting(playerid)
{
        Count = 1;
        GameTextForAll("~y~3",1000,6);
        SetTimer("Counting2",1000,false);
        return 1;
}
public Counting2(playerid)
{
        Count = 1;
        GameTextForAll("~g~2",1000,6);
        SetTimer("Counting1",1000,false);
        return 1;
}
public Counting1(playerid)
{
        Count = 1;
        GameTextForAll("~b~1",1000,6);
        SetTimer("CountingGO",1000,false);
        return 1;
}
public CountingGO(playerid)
{
        Count = 0;
        GameTextForAll("~r~GO!!!",1000,6);
        return 1;
}
Reply


Messages In This Thread
ongamemodeinit ? - by andrewgrob - 01.02.2013, 16:11
Re: ongamemodeinit ? - by dr.lozer - 01.02.2013, 17:14
Re: ongamemodeinit ? - by andrewgrob - 01.02.2013, 17:24

Forum Jump:


Users browsing this thread: 1 Guest(s)