[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(playeridanameMAX_PLAYER_NAME);
format(filesizeof(file), PASTA_CONTASaname);
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(cmdtextidx);
if(!
strlen(tmp)){
SendClientMessage(playeridVermelho"(ERRO) Use: /su [id]");
return 
1;
}
plid strval(tmp);
if(!
IsPlayerConnected(plid)){
SendClientMessage(playeridVermelho"(ERRO) O Jogador nгo esta online");
return 
1;
} else {
new 
pname[MAX_PLAYER_NAME];
GetPlayerName(plidpnameMAX_PLAYER_NAME);
format(file2sizeof(file2), PASTA_CONTASpname);
SendClientMessage(plidAvisostring);
format(stringsizeof(string), "(INFO) O Policial %s te setou 1 nivel de procurado By Mister"aname);
SendClientMessage(plidBluestring);
SetPlayerWantedLevel(plid1);
SendClientMessage(playeridVermelho,"(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)