Need help on my countdown script
#4


pawn Код:
#include <a_samp>
#define FILTERSCRIPT
#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
  print("\n----------------------------------------");
  print(" Countdown FilterScript");
  print("----------------------------------------\n");
  return 1;
}
#else
#endif
#define COLOR_LIGHTBLUE 0x33CCFFAA
#define COLOR_PINK 0xFF00FFAA
forward countdown();

new Float:X, Float:Y, Float:Z, Float:X2, Float:Y2, Float:Z2, CountStage = 0, timer, Float:dist;
new pName[MAX_PLAYER_NAME], string[25 + MAX_PLAYER_NAME], Frozen[MAX_PLAYERS];
new Freeze = 0, Locality = 1;

/*
Variables Explained:
Floats: X,Y and Z refer to the position of the player who types the command
Floats: X2, Y2 and Z2 refer to the position of the player currently being compared
CountStage determines where the counter is at, 0 means it is off
timer stores the timerid used in the KillTImer()
Float dist stores the distance found in the Distance stock
pname[] is the Playername, string[] is the string sent, frozen[] stores the players Freeze status (on(1) or off(0))
Freeze determines whether player freezing is on/off - it is changed ingame with the command /togfreeze
Locality determines whether the entire server will be effected, or just players within the defined radius - /toglocal
*/


public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp(cmdtext,"/count",true) == 0)
    {
    if(CountStage ==0)
        {
        GetPlayerName(playerid, pName, sizeof(pName));
        format(string, sizeof(string), "*** %s started count.", pName);
        timer = SetTimer("countdown",1000,1);
        CountStage = 3;
         }
    }
}

Reply


Messages In This Thread
Need help on my countdown script - by soldierman - 28.05.2009, 12:10
Re: Need help on my countdown script - by Gappy - 28.05.2009, 12:12
Re: Need help on my countdown script - by Weirdosport - 28.05.2009, 12:14
Re: Need help on my countdown script - by shoru - 24.08.2009, 22:33
Re: Need help on my countdown script - by soldierman - 25.08.2009, 10:21
Re: Need help on my countdown script - by James_Alex - 25.08.2009, 10:30

Forum Jump:


Users browsing this thread: 1 Guest(s)