[Ajuda] Como por tempo em um Comando
#1

Seguinte eu criei o comando "/su" para meu servidor
PHP код:
if(strcmp(cmd, "/su", true) == 0) {
new 
aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
format(file, sizeof(file), PASTA_CONTAS, aname);
if(
dini_Int(file, "Profissao") == Policial_C || dini_Int(file, "Profissao") == Policial_F || dini_Int(file, "Profissao") == Delegado || dini_Int(file, "Profissao") == Bope || dini_Int(file, "Profissao") == Swat || dini_Int(file, "Profissao") == Narcoticos || dini_Int(file, "Profissao") == Policial_M || dini_Int(file, "Profissao") == FBI || dini_Int(file, "Profissao") == LSPD || dini_Int(file, "aAdmin") == 1) {
new 
tmp[256];
new 
plid;
tmp = strtok(cmdtext, idx);
if(!
strlen(tmp)){
SendClientMessage(playerid, Vermelho, "(ERRO) Use: /su [id]");
return 
1;
}
plid = strval(tmp);
if(!
IsPlayerConnected(plid)){
SendClientMessage(playerid, Vermelho, "(ERRO) O Jogador nгo esta online");
return 
1;
} else {
new 
pname[MAX_PLAYER_NAME];
GetPlayerName(plid, pname, MAX_PLAYER_NAME);
format(file2, sizeof(file2), PASTA_CONTAS, pname);
SendClientMessage(plid, Aviso, string);
format(string, sizeof(string), "(INFO) O Policial %s te setou 1 nivel de procurado By Mister", aname);
SendClientMessage(plid, Blue, string);
SetPlayerWantedLevel(plid, 1);
SendClientMessage(playerid, Vermelho,"(INFO) Vocк deu nivel 1 de procurado ao Jogador");
return 
1;
}
}
} 
Entгo galera, para que os policiais nгo fiquem floodando, eu gostaria de que vocкs pegassem este cуdigo que fiz
e botasse com jб o Timer, que vai fazer aparecer
"Vocк jб usou esse comando, Espere 5 Minutos Para Usar Denovo"

Obrigado galera, tentei usar o SetTimerEx, Porem nгo deu mt certo
Ajuda plz
Reply
#2

Usa SetTimerEx
Reply
#3

Eu disse que tinha tentado usar SetTimerEx, Porem NГO FOI!
Reply
#4

Quote:
Originally Posted by Equipe
Посмотреть сообщение
Eu disse que tinha tentado usar SetTimerEx, Porem NГO FOI!
Manolo, cria uma forward com o comando do su, entгo quando o player usб-lo iniciarб a contбgem! Num tem erro! '-'
Reply
#5

Usa gettime+SetPVarInt ou se nгo kiser SetPVarInt cria a variavel para definir o tempo !
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)