27.07.2011, 22:03
it/s posible to make something like this
PHP код:
new pee;
forward peeing(playerid);
public peeing(playerid)
{
GivePlayerHealth(playerid,-50)
return 1;
}
forward warning(playerid);
public warning(playerid)
{
SendClientMessage(playerid,COLOR_RED,"You must pee for 5 minute!");
return 1;
}
public OnPlayerConnect(playerid)
{
SetTimer("warning",1500000,true)//now everi 25 min
pee = SetTimer("peeing",1800000,true); //now every 30 min
return 1;
}
if(strcmp(cmd, "/pee", true) == 0)
{
KillTimer(pee)
SendClientMessage(playerid,COLOR_RED,"aaa thats feel good");
//here the animatiion for pee-ing
return 1;
}
//but how to make that the timer repeate evre 30 min but when you use the /pee command that only stops the timer interval?