#include <a_samp>
#include <zcmd>
new timer, contagem = 15;
new IniciouC[MAX_PLAYERS];
CMD:iniciarcorrida(playerid)
{
if(IniciouC[playerid] == 1)
return SendClientMessage(playerid,-1, "Uma corrida jб foi iniciada !");
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1, "Vocк precisa de um carro para iniciar uma corrida !");
if(IsPlayerInRangeOfPoint(playerid, 2.0, 2695.6880, -1704.6300, 11.8438)) return SendClientMessage(playerid, -1, "Vocк nгo pode iniciar uma corrida aqui !");
new Nome[20], s[80];
GetPlayerName(playerid, Nome, 20 );
format(s, sizeof(s),"O Jogador {09D6E1}%s {FFFFFF}Iniciou uma Corrida !", Nome );
SendClientMessageToAll(-1, s );
timer = SetTimer("Contagem",1000,true);
IniciouC[playerid] = 1;
return 1;
}
forward Contagem();
public Contagem()
{
contagem--;
if(contagem > 0)
{
for(new i = 0, j = GetMaxPlayers(); i != j; i++)
{
new string[30];
format(string,sizeof(string),"%i",contagem);
GameTextForPlayer(i, contagem,1000,0);
}
}
else
{
for(new i = 0, j = GetMaxPlayers(); i != j; i++)
{
GameTextForPlayer(i,"~g~ Acelera !",3000,0);
KillTimer(timer);
}
}
return true;
}
C:\Users\Lucas\Desktop\Corrida.pwn(38) : error 035: argument type mismatch (argument 2)
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Error.
#define IsPlayerRangeOfPoint PlayerToPoint
if(IniciouC[playerid] == 1)
IniciouC[playerid] = 1;
#define PlayerToPoint IsPlayerRangeOfPoint
#define IsPlayerRangeOfPoint PlayerToPoint
pawn Код:
pawn Код:
|
C:\Users\Lucas\Desktop\Corrida.pwn(38) : error 035: argument type mismatch (argument 2)
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Error.
GameTextForPlayer
GameTextForAll
Troque
pawn Код:
pawn Код:
|
forward Contagem();
public Contagem()
{
contagem--;
if(contagem > 0)
{
for(new i = 0, j = GetMaxPlayers(); i != j; i++)
{
new string[30];
format(string,sizeof(string),"%i",contagem);
GameTextForAll(i, contagem,1000,0);
}
}
else
{
for(new i = 0, j = GetMaxPlayers(); i != j; i++)
{
GameTextForAll(i,"~g~ Acelera !",3000,0);
KillTimer(timer);
}
}
return true;
}
C:\Users\Lucas\Desktop\Corrida.pwn(38) : error 035: argument type mismatch (argument 1)
C:\Users\Lucas\Desktop\Corrida.pwn(45) : error 035: argument type mismatch (argument 1)
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
2 Errors.
forward Contagem();
public Contagem()
{
contagem--;
if(contagem > 0)
{
new string[30];
format(string,sizeof(string),"%i",contagem);
GameTextForAll(string,1000,0);
}
else
{
GameTextForAll("~g~ Acelera !",3000,0);
KillTimer(timer);
}
return true;
}