30.01.2011, 21:24
Hi, i use Raven's GM! but i got problems with /ddcount. when i type the command the count start but start in 0, then -1 -2 -3 -4 ,etc! and never finish. only when i restart the server.. CODES:
Command code:
Other code:
And whats i need add for when a car enter in DD the car repair?? THANKSS! AND HELP ME PLEASE!
sorry for my bad english
Command code:
pawn Код:
if(strcmp(cmd,"/ddcount",true) == 0 || strcmp(cmd,"/ddcd",true) == 0)
{
if(PlayerInfo[playerid][pDM] == 1)
{
ddcounttimer = SetTimer("DDCountdown", 1000, true);
}
return 1;
}
pawn Код:
public DDCountdown()
{
new string[64];
for(new i=0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(IsPlayerInRangeOfPoint(i,400,-1398.3799,994.8915,1024.0889))
{
ddcount --;
if(ddcount != -20)
{
format(string, sizeof(string),"~r~DD Countdown: ~n~~n~%d",ddcount);
}
else
{
format(string, sizeof(string),"~r~DD Countdown: ~n~~n~~g~GO GO GO!",ddcount);
KillTimer(ddcounttimer);
}
GameTextForPlayer(i,string,1000,4);
new Float:X, Float:Y, Float:Z;
GetPlayerPos(i, X,Y,Z);
PlayerPlaySound(i, 1056, X, Y, Z);
}
}
}
return 1;
}
sorry for my bad english