12.02.2012, 17:58
Hello,i have a problem at my countdown command.i type /countdown,the count starts to count
) ,it shows to all players but it freezes only the player who type the command.What's wrong?

pawn Код:
#include "a_samp"
#include "zcmd"
new Count;
#define RANGEOFSTARTER 20 // freezes all that are in range of player(20 meters) that
// actived /countdown
forward Counting(playerid);
forward Counting2(playerid);
forward Counting1(playerid);
forward CountingGO(playerid);
public OnFilterScriptInit()
{
Count = 0;
}
CMD:countdown(playerid,params[])
{
new Float:x,Float:y,Float:z;
GetPlayerPos(playerid, x, y, z);
if (Count == 0)
{
SetTimer("Counting",1000,false);
}else{
SendClientMessage(playerid, 0xFF0000FF,"Countdown already started!");
}
if IsPlayerInRangeOfPoint(playerid, RANGEOFSTARTER, x, y, z)*then
{
TogglePlayerControllable(playerid, 0);
}
return 1;
}
public Counting(playerid)
{
Count = 1;
GameTextForAll("~y~3",1000,6);
PlayerPlaySound(playerid, 1056,0,0,0);
SetTimer("Counting2",1000,false);
return 1;
}
public Counting2(playerid)
{
Count = 1;
GameTextForAll("~y~2",1000,6);
PlayerPlaySound(playerid, 1056,0,0,0);
SetTimer("Counting1",1000,false);
return 1;
}
public Counting1(playerid)
{
Count = 1;
GameTextForAll("~y~1",1000,6);
PlayerPlaySound(playerid, 1056,0,0,0);
SetTimer("CountingGO",1000,false);
return 1;
}
public CountingGO(playerid)
{
Count = 0;
PlayerPlaySound(playerid, 1057,0,0,0);
GameTextForAll("~y~GO!!!",1000,6);
TogglePlayerControllable(playerid, 1);
return 1;
}