Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //contagem [1 ao 10] [Mensagem] em ZCMD/SSCANF
- #include <a_samp>
- #include <sscanf2>
- #include <zcmd>
- new bool: Apenas1x = false;
- CMD:contagem(playerid, params[])
- {
- static Numeros, MSG[60];
- if(Apenas1x) return SendClientMessage(playerid, -1, "Uma contagem jΓ‘ estΓ‘ me andamento, tente novamente mais tarde.");
- if(sscanf(params, "ds[60]", Numeros, MSG))
- return SendClientMessage(playerid, -1, "Use: /contagem [1 ao 10] [Mensagem]");
- if(Numeros > 10) return SendClientMessage(playerid, -1, "A contagem deve ser 1 ao 10.");
- if(Numeros < 1) return SendClientMessage(playerid, -1, "A contagem deve ser 1 ao 10.");
- Apenas1x = true;
- Contar(Numeros);
- return true;
- }
- forward Contar(Contagem);
- public Contar(Contagem)
- {
- static VBString[3];
- format(VBString, 3, "%d",Contagem);
- if(Contagem > 0)
- {
- GameTextForAll(VBString, 700, 5);
- SetTimerEx("Contar",1000, false, "i", Contagem-1);
- }
- else GameTextForAll("Valendo !", 1000, 5), Apenas1x = false;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement