public not running
#1

(Sry for bad English ! )
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;
}
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?
Reply


Messages In This Thread
public not running - by wofka13 - 04.06.2010, 23:57
Re: public not running - by PotH3Ad - 05.06.2010, 00:07
Re: public not running - by wofka13 - 05.06.2010, 00:38
Re: public not running - by Nero_3D - 05.06.2010, 00:57

Forum Jump:


Users browsing this thread: 1 Guest(s)