C:\DOCUME~1\Conta\Desktop\GMON\FILTER~1\freio.pwn(325) : error 076: syntax error in the expression, or invalid function call C:\DOCUME~1\Conta\Desktop\GMON\FILTER~1\freio.pwn(326) : error 035: argument type mismatch (argument 2) C:\DOCUME~1\Conta\Desktop\GMON\FILTER~1\freio.pwn(328) : warning 202: number of arguments does not match definition C:\DOCUME~1\Conta\Desktop\GMON\FILTER~1\freio.pwn(328) : warning 202: number of arguments does not match definition
new Float: X[MAX_VEHICLES], Float:Y[MAX_VEHICLES], Float:Z[MAX_VEHICLES]; forward FreioUsado();
TirarFreio[vehicleid] = SetTimerEx("FreioUsado", 1, true, "i", vehicleid);
KillTimer(TirarFreio[vehicleid]);
public FreioUsado() { new vehicleid = GetPlayerVehicleID; new pegarpos = GetVehiclePos(vehicleid, X, Y, Z); { SetVehiclePos(vehicleid, pegarpos); } }
public FreioUsado()
{
new vehicleid = GetPlayerVehicleID;
new Float:P[2];
{
GetVehiclePos(vehicleid, P[0], P[1], P[2]);
SetVehiclePos(vehicleid, P[0], P[1], P[2]);
}
}
pawn Код:
|
public FreioUsado(playerid)
{
new vehicleid = GetPlayerVehicleID(playerid);
new Float:P[3];
GetVehiclePos(vehicleid, P[0], P[1], P[2]);
SetVehiclePos(vehicleid, P[0], P[1], P[2]);
return 1;
}
que isso?
olha { e} a mais e sao 3 pos n 2 pawn Код:
|
https://sampwiki.blast.hk/wiki/SetTimerEx
Exemplo SetTimerEx("EndAntiSpawnKill", 5000, true, "i", playerid); |
if(strcmp(cmdtext, "/freio", true) == 0) { for(new i = 0; i < MAX_PLAYERS; i++) { new vehicleid = GetPlayerVehicleID(playerid); if(Engine[vehicleid] == 1) { if(Freio[vehicleid] == 0) { SendClientMessage(playerid, COLOR_LIGHTRED, "Freio de Mгo Desativado."); format(string, sizeof(string), "*%s Tira o freio de mгo.", sendername); ProxDetector(30.0, i, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); Freio[vehicleid] = 1; KillTimer(TirarFreio[vehicleid]); } else if(Freio[vehicleid] == 1) { SendClientMessage(playerid, COLOR_LIGHTRED, "Freio de Mгo Ativado."); format(string, sizeof(string), "*%s Puxa o freio de mгo.", sendername); ProxDetector(30.0, i, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); Freio[vehicleid] = 0; TirarFreio[vehicleid] = SetTimerEx("FreioUsado", 100, true, "i", vehicleid); } } else { SendClientMessage(playerid, COLOR_LIGHTRED, "Ligue o veiculo antes de mexer no freio de mгo!."); } } return 1; }
public FreioUsado(playerid) { new vehicleid = GetPlayerVehicleID(playerid); new Float:P[3]; GetVehiclePos(vehicleid, P[0], P[1], P[2]); SetVehiclePos(vehicleid, P[0], P[1], P[2]); return 1; }