public OnPlayerEnterCheckpoint(playerid) { if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 431) { new Money = 50000; if(transportJob[playerid] == 1) { transportJob[playerid] = 2; GameTextForPlayer(playerid, "~g~Download...", 2000, 5); SetPlayerCheckpoint(playerid,924.1577,-1352.3125,13.0807,5); TogglePlayerControllable(playerid,0); Si le pongo esto se congela y nunca avanza el vehiculo tengo que bajarme para seguir SendClientMessage(playerid,COLOR_DARKGOLD,"* Go to these points and distribute!"); SetTimerEx("Download", 5000, 0, "i", playerid);Este no hace ninguna funcion }
#define TimeCheck 5000 // Cantidad de mili-segundos que durara congelado cambiar si se desea.
new ContinuarCongelado[MAX_PLAYERS];
public OnPlayerEnterCheckpoint(playerid)
{
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 431)
{
new check = GetClosestPlayer(playerid);
if(IsPlayerConnected(check))
{
if(ContinuarCongelado[playerid] == 1)
{
new Money = 50000;
if(transportJob[playerid] == 1)
{
transportJob[playerid] = 2;
GameTextForPlayer(playerid, "~g~Download...", 2000, 5);
SetPlayerCheckpoint(playerid,924.1577,-1352.3125,13.0807,5);
TogglePlayerControllable(playerid, 0);
TogglePlayerControllable(check, 0);
ContinuarCongelado[playerid] = 1;
SendClientMessage(playerid,COLOR_DARKGOLD,"* Go to these points and distribute!");
SetTimerEx("Download", 5000, 0, "i", playerid);Este no hace ninguna funcion
SetTimerEx("TiempoCongelado", TimeCheck, 0, "d", check);
SetTimerEx("CortarTiempoCongelado", TimeCheck, 0, "d", playerid);
}
forward TiempoCongelado(playerid);
public TiempoCongelado(playerid)
{
TogglePlayerControllable(playerid, 1);
return 1;
}
forward CortarTiempoCongelado(playeri);
public CortarTiempoCongelado(playerid)
{
TogglePlayerControllable(playerid, 1);
ContinuarCongelado[playerid] = 0;
return 1;
}
forward GetClosestPlayer(p1);
publi GetClosestPlayer(p1)
{
new x,Float:dis,Float:dis2,player2;
player2 = -1;
dis = 99999.99;
for (x=0;x<MAX_PLAYERS;x++)
{
if(IsPlayerConnected(x))
{
if(x != p1)
{
dis2 = GetDistanceBetweenPlayers(x,p1);
if(dis2 < dis && dis2 != -1.00)
{
dis = dis2;
player2 = x;
}
}
}
}
return player2;
}
forward Float:GetDistanceBetweenPlayers(p1,p2);
public Float:GetDistanceBetweenPlayers(p1,p2)
{
new Float:x1,Float:y1,Float:z1,Float:x2,Float:y2,Float:z2;
if(!IsPlayerConnected(p1) || !IsPlayerConnected(p2))
{
return -1.00;
}
Entonces agrega con llas otras funciones esto
Function.. Estoy del cel y son las 7:49 am aguarda a que llegue a mi casa debes crear la funcion del timer poniendo Function NombreDelTinmer(playerid); { TogglePlayerControllavle(playerid, 1); return1; } Prueba, no se si funcione lo hice del cel jaj |
new check = GetClosestPlayer(playerid); ((--------aca es la 137 if(IsPlayerConnected(check)) { if(ContinuarCongelado[playerid] == 1) {
C:\Users\NTV\Desktop\job.pwn(137) : error 012: invalid function call, not a valid address C:\Users\NTV\Desktop\job.pwn(137) : warning 215: expression has no effect C:\Users\NTV\Desktop\job.pwn(137) : error 001: expected token: ";", but found ")" C:\Users\NTV\Desktop\job.pwn(137) : error 029: invalid expression, assumed zero C:\Users\NTV\Desktop\job.pwn(137) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.