SA-MP Forums Archive
[Ajuda] Como por tempo em um Comando - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Como por tempo em um Comando (/showthread.php?tid=405926)



Como por tempo em um Comando - Equipe - 08.01.2013

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


Re: Como por tempo em um Comando - HeyHoLetsGo - 08.01.2013

Usa SetTimerEx


Re: Como por tempo em um Comando - Equipe - 08.01.2013

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


Re: Como por tempo em um Comando - HeyHoLetsGo - 08.01.2013

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! '-'


Re: Como por tempo em um Comando - Coreia - 08.01.2013

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