24.07.2010, 03:57
Ok, real simple problem here. I wanna set a timer to do something in a given time (obviously...)
at the top I put:
Then here I put:
Then here goes..:
The problem is simple.......THIS DOESN'T HAPPEN IN THE GAME....why?
at the top I put:
Код:
forward Time();
Код:
DropFlag(playerid) { new str[256]; if(PlayerStat[playerid][pflag]) { new Float:x,Float:y,Float:z; GetPlayerPos(playerid,x,y,z); DestroyObject(flag[PlayerStat[playerid][pflag]]); format(str,sizeof(str),"[%d]%s has dropped the flag! It will return to its orgin in 30 seconds.",playerid,PlayerName(playerid)); SendClientMessageToAll(GetPlayerColor(playerid),str); dflag[PlayerStat[playerid][pflag]] = CreatePickup(2993,1,x,y,z,0); PlayerStat[playerid][pflag]=0; SetTimer("Time",3000,0); } return 1; }
Код:
public Time() { DropTimer(); } DropTimer() { if(drop[1]) { DestroyPickup(dflag[1]); lsflag1 = CreatePickup(2993,1,2528.657715, -1666.986938, 14.863762); //code continues and is ended with no syntax errors, etc...........