04.06.2010, 23:57
(Sry for bad English !
)
Hi Guys,
i habe problem with my CMD.
So, my problem is the public TankZeit
If I run the cmd, so everything is still working, I hang and can not move me, as it also should be, but the timer is running and then trigger the public will not work correctly. I will not after 2000 milliseconds unfreezed and my petrol indicator does not rise to the entered number in /tanken [number], and as I get no message, my display tank does not rise and I stay freezed, so it looks like as if the public is not running, can someone help me?
)Hi Guys,
i habe problem with my CMD.
Код:
forward TankZeit(playerid, insert);
Код:
if(strcmp(cmd,"/tanken",true)==0)
{
if(!TankStation(playerid))return SendClientMessage(playerid,FARBE_WEIЯ,"Du bist nicht an einer Tank Station!");
if(!IsPlayerInAnyVehicle(playerid))return SendClientMessage(playerid,FARBE_WEIЯ,"Du bist nicht in einem Fahrzeug!");
if(GetPlayerMoney(playerid) < 100)return SendClientMessage(playerid,FARBE_WEIЯ,"Du hast nicht genug Geld!");
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))return SendClientMessage(playerid,FARBE_WEIЯ,"Benutzung: Benutze /tanken [menge]");
new setin = strval(tmp);
TogglePlayerControllable(playerid,0);
SetTimerEx("TankZeit",2000,0, "d", setin);
return 1;
}
return 1;
}
Код:
public TankZeit(playerid, insert)
{
new Liter = GetPlayerVehicleID(playerid);
new tString[64];
Benzin[Liter] += insert;
format(tString,sizeof(tString),"Du hast %s Liter getankt.",insert);
SendClientMessage(playerid,FARBE_GELB,tString);
TogglePlayerControllable(playerid,1);
return 1;
}
If I run the cmd, so everything is still working, I hang and can not move me, as it also should be, but the timer is running and then trigger the public will not work correctly. I will not after 2000 milliseconds unfreezed and my petrol indicator does not rise to the entered number in /tanken [number], and as I get no message, my display tank does not rise and I stay freezed, so it looks like as if the public is not running, can someone help me?

