17.04.2013, 19:05
Hi,
my problem is, that the Event don't stop. So the last timer (Minigunestop) don't get triggert or the noswitchgun timer don't get destroied. Hope you can help me, here the code.
my problem is, that the Event don't stop. So the last timer (Minigunestop) don't get triggert or the noswitchgun timer don't get destroied. Hope you can help me, here the code.
PHP код:
forward Minigunevent(playerid);
forward noswitchgun(playerid);
forward Minigunestop(playerid);
PHP код:
public Minigunevent(playerid)
{
SendClientMessage(playerid,Grьn,"Minigun-Event wurde gestartet.");
GameTextForAll("~g~MINIGUN-EVENT!",3500,3);
noswitchgunminitimer = SetTimer("noswitchgun",1,true);
SetTimer("Minigunestop",1000*5,false);
return 1;
}
public noswitchgun(playerid)
{
GivePlayerWeapon(playerid,38,99999);
return 1;
}
public Minigunestop(playerid)
{
KillTimer(noswitchgunminitimer);
RemovePlayerWeapon(playerid,38);
GameTextForAll("~g~Das Event wurde beendet",3000,3);
return 1;
}
PHP код:
public OnGameModeInit()
{
SetTimer("Minigunevent",1000*10,true);