Ajuda? -
FireBallPlays - 11.07.2012
Eu queria um timer (sabe akeles negocio de /contar dai 3,2,1 go)so para adm level3 pra cima e que quando o timer for acionado,ninguem podera se mecher assim nao havera trapaзa,Podem azer isso por gentileza para mim
![Huh?](images/smilies/confused.gif)
![Huh?](images/smilies/confused.gif)
![Huh?](images/smilies/confused.gif)
??
Re: Ajuda? -
andmeida10 - 11.07.2012
SetTimer:
https://sampwiki.blast.hk/wiki/SetTimerEx
Congelar/Descongelar:
https://sampwiki.blast.hk/wiki/TogglePlayerControllable
Variaveis:
https://sampforum.blast.hk/showthread.php?tid=235924
Re: Ajuda? -
zbt - 11.07.2012
pawn Код:
new tempo = 3;
CMD:contar(playerid) {
Contar();
SendClientMessage(playerid, -1, "Contagem iniciada!");
for(new i; i < MAX_PLAYERS; ++i) {
TogglePlayerControllable(i, false);
}
return true;
}
forward Contar();
public Contar() {
if(!tempo) {
tempo = 3;
GameTextForAll("GO !", 2000, 4);
for(new i; i < MAX_PLAYERS; ++i) {
TogglePlayerControllable(i, true);
}
return false;
}
new s[128];
format(s, 128, "%i", tempo);
GameTextForAll(s, 2000, 4);
SetTimer("Contar", 1000, false);
tempo --;
return true;
}
Re: Ajuda? -
FireBallPlays - 11.07.2012
Quote:
Originally Posted by zbt
pawn Код:
new tempo = 3;
CMD:contar(playerid) { Contar(); SendClientMessage(playerid, -1, "Contagem iniciada!"); for(new i; i < MAX_PLAYERS; ++i) { TogglePlayerControllable(i, false); } return true; }
forward Contar(); public Contar() { if(!tempo) { tempo = 3; GameTextForAll("GO !", 2000, 4); for(new i; i < MAX_PLAYERS; ++i) { TogglePlayerControllable(i, true); } return false; } new s[128]; format(s, 128, "%i", tempo); GameTextForAll(s, 2000, 4); SetTimer("Contar", 1000, false); tempo --; return true; }
|
Cara num deu nao Tente faze com da pra tu modifica esse?
pawn Код:
if (strcmp(cmdtext, "/contar", true)==0)
{
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
format(file, sizeof(file), PASTA_CONTAS, aname);
if(pAdmin[playerid] > 0){
if(Count >= 3)
{
SendClientMessage(playerid, 0x33AA33AA, "(INFO) Contador й iniciado!");
CountDown();
return 1;
}else{
SendClientMessage(playerid, 0xAA3333AA, "(ERRO) Contador jб estб ativado!");
return 1;
}
}
}
Re: Ajuda? -
sanalex - 12.07.2012
Topo do GM:
new tempo = 3;
Bota dentro da public OnPlayerCommandText:
pawn Код:
if (strcmp(cmdtext, "/contar", true)==0)
{
Contar();
SendClientMessage(playerid, -1, "Contagem iniciada!");
for(new i; i < MAX_PLAYERS; ++i) {
TogglePlayerControllable(i, false);
}
return true;
}
Bota no final do GM:
pawn Код:
forward Contar();
public Contar() {
if(!tempo) {
tempo = 3;
GameTextForAll("GO !", 2000, 4);
for(new i; i < MAX_PLAYERS; ++i) {
TogglePlayerControllable(i, true);
}
return false;
}
new s[128];
format(s, 128, "%i", tempo);
GameTextForAll(s, 2000, 4);
SetTimer("Contar", 1000, false);
tempo --;
return true;
}
Nгo testei sу adaptei...
Re: Ajuda? -
FireBallPlays - 12.07.2012
Quote:
Originally Posted by sanalex
Topo do GM:
new tempo = 3;
Bota dentro da public OnPlayerCommandText:
pawn Код:
if (strcmp(cmdtext, "/contar", true)==0) { Contar(); SendClientMessage(playerid, -1, "Contagem iniciada!"); for(new i; i < MAX_PLAYERS; ++i) { TogglePlayerControllable(i, false); } return true; }
Bota no final do GM:
pawn Код:
forward Contar(); public Contar() { if(!tempo) { tempo = 3; GameTextForAll("GO !", 2000, 4); for(new i; i < MAX_PLAYERS; ++i) { TogglePlayerControllable(i, true); } return false; } new s[128]; format(s, 128, "%i", tempo); GameTextForAll(s, 2000, 4); SetTimer("Contar", 1000, false); tempo --; return true; }
Nгo testei sу adaptei...
|
Obg cara :3
Re: Ajuda? -
sanalex - 12.07.2012
De nada
![Smiley](images/smilies/smile.png)
, mas lembrando que do jeito que tб aн todo mundo vai poder usar o comando, manda algum comando seu de admin para adaptar se quizer.
Re: Ajuda? -
FireBallPlays - 12.07.2012
Quote:
Originally Posted by sanalex
De nada ![Smiley](images/smilies/smile.png) , mas lembrando que do jeito que tб aн todo mundo vai poder usar o comando, manda algum comando seu de admin para adaptar se quizer.
|
pawn Код:
if(strcmp(cmd,"/minigun",true)==0){
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
format(file, sizeof(file), PASTA_CONTAS, aname);
if(pAdmin[playerid] == 4 || pAdmin[playerid] == 5){
GivePlayerWeapon(playerid, 38, 999999);
return 1;
}
}
codigo de Minigun XD mas agora to com otraduvida jaja posto no forum