|
/count Aguarde: 5 4 3 2 1 fiz ta ae? troolll mode on!!! #topic, e desse geito que fiz acima que tu quer tipo : Aguarde a Contagem... 5 4 3 2 1 GOGO!!!! |
: error 035: argument type mismatch (argument 2)|
cara, se eu deixo normal nem da erro, mas eu ponho send.. oia q da: C:\Users\Gustavo\Desktop\Server 0.3a r8\gamemodes\KT.pwn(1707) : error 035: argument type mismatch (argument 2)
C:\Users\Gustavo\Desktop\Server 0.3a r8\gamemodes\KT.pwn(170 : error 035: argument type mismatch (argument 2)C:\Users\Gustavo\Desktop\Server 0.3a r8\gamemodes\KT.pwn(1709) : error 035: argument type mismatch (argument 2) C:\Users\Gustavo\Desktop\Server 0.3a r8\gamemodes\KT.pwn(1710) : error 035: argument type mismatch (argument 2) C:\Users\Gustavo\Desktop\Server 0.3a r8\gamemodes\KT.pwn(1711) : error 035: argument type mismatch (argument 2) C:\Users\Gustavo\Desktop\Server 0.3a r8\gamemodes\KT.pwn(1712) : error 035: argument type mismatch (argument 2) Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 6 Errors. |
|
Vocк nгo mudou de GameText para SendClientMessage. Se vocк mudou, esqueceu de "adaptar" os parвmetros. |
public Contagem(playerid)
{
KillTimerC = SetTimerEx("Contagem",1000,false,"i",playerid); //Farб com que ele chame essa callback a cada 1 segundo, OBS.: nunca ponha true em lugar de false, pois irб causar lags e atй crash de seu servidor
Count[playerid]--; //Quando a callback й chamada a cada 1 segundo ele irб diminuir 1 valor da vбriavel Count
for(new i; i < MAX_PLAYERS; i++) //Isso й um Loop para todos os jogadores...
{
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid,X,Y,Z); //Pega as coordenadas do jogador
if(IsPlayerInRangeOfPoint(i,150.0,X,Y,Z)) //...porйm isso limita somente aos jogadores prуximos a vocк em um raio de 150m
{
TogglePlayerControllable(i,false); //Se tiver jogadores prуximo a vocк, todos serгo congelados, inclusive vocк
if(Count[playerid] == 1) SendClientMessage(i,"~g~VAI!",1000,5),KillTimer(KillTimerC),Count[playerid] = 0, TogglePlayerControllable(i,true); //Quando a vбriavel chegar a 1 ela irб parar de chamar a callback e zerar a vбriavel Count para zero, fazendo assim com que vocк possa reutilizar o comando /contar
if(Count[playerid] == 2) SendClientMessage(i,"~g~1",1000,5);
if(Count[playerid] == 3) SendClientMessage(i,"~y~2",1000,5);
if(Count[playerid] == 4) SendClientMessage(i,"~y~3",1000,5);
if(Count[playerid] == 5) SendClientMessage(i,"~r~4",1000,5);
if(Count[playerid] == 6) SendClientMessage(i,"~r~5",1000,5);
}
}
return 1;
}
forward Contar();
new bool:Contando,
TimerContar,
Countdown;
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/contar", cmdtext, true, 10) == 0)
{
if(!Contando)
{
new iStr[60];
static pName[24];
GetPlayerName(playerid, pName, 24);
format(iStr, sizeof(iStr),"INFO: %s comeзou uma contagem!", pName);
SendClientMessageToAll(0x008000AA, iStr);
TimerContar = SetTimer("Contar", 1000, 1);
Contando = true;
}
if(Contando)
{
SendClientMessage(playerid, -1, "INFO: Erro! Uma contagem jб estб sendo feita.");
}
return 1;
}
return 0;
}
public Contar()
{
switch(Countdown)
{
case 1:
{
Countdown ++;
SendClientMessageToAll(0x008000AA, "Contagem: 5");
}
case 2:
{
Countdown ++;
SendClientMessageToAll(0x008000AA, "Contagem: 4");
}
case 3:
{
Countdown ++;
SendClientMessageToAll(0x008000AA, "Contagem: 3");
}
case 4:
{
Countdown ++;
SendClientMessageToAll(0x008000AA, "Contagem: 2");
}
case 5:
{
Countdown ++;
SendClientMessageToAll(0x008000AA, "Contagem: 1");
}
case 6:
{
Countdown = 1;
//Killar();
KillTimer(TimerContar);
SendClientMessageToAll(0x008000AA, "Contagem: Go Go Go");
Contando = false;
}
}
return 1;
}
|
Eu fiz esse aqui, me corrijam se tiver algo errado, nгo testei, mas compilei, estб sem erros.
pawn Код:
|