09.06.2013, 17:48
(
Последний раз редактировалось Mateus_Henrique; 09.06.2013 в 18:34.
)
Edit:Eu quero que o timer pare na hora que o jogador desconecta do servidor,mas ele continua ativo.
pawn Код:
new Timer[MAX_PLAYERS];
forward Teste(playerid);
public OnPlayerCommandText(playerid, cmdtext[]){
if(strcmp( cmd, "/ativartimer", true ) == 0 ){
Timer[playerid] = SetTimerEx("Teste",1000,true,"i",playerid);
return 1;
}
return 1;
}
public Teste(playerid){
SendClientMessage(playerid,-1,"Olб");
return 1;
}
public OnPlayerDisconnect(playerid){
KillTimer(Timer[playerid]);
return 1;
}