13.10.2014, 16:51
Olб,quando um player entra em 1 checkpoint,o player que estб encima do carro й levado pra mesma posiзгo que o veнculo й levado,tem como fazer que sу o veiculo seja setado de posiзгo ?
new surf = GetPlayerSurfingVehicleID(playerid);
if(surf == INVALID_VEHICLE_ID) SendClientMessage(playerid, COLOR_RED, "You are not surfing.");
new surf = GetPlayerSurfingVehicleID(playerid);
if(surf == VALID_VEHICLE_ID) SendClientMessage(playerid, COLOR_RED, "You are not surfing.");
NotTeleportPlayerSurfing(playerid, Float: tex, Float: tey, Float: tez, Float: teang, tevw, teint)
{
new Float: plx, Float: ply, Float: plz;
GetPlayerPos(playerid, plx, ply, plz);
new playercar = GetPlayerVehicleID(playerid);
if(IsPlayerInAnyVehicle(i))
{
for(new i=0; i<500; i++)
{
if(IsPlayerConnected(i))
{
if(IsPlayerInRangeOfPoint(i, 3.0, plx, ply, plz))
{
if(GetPlayerSurfingVehicleID(i) == playercar)
{
new Float: ntx, Float: nty, Float: ntz, vw, nti;
GetPlayerPos(i, ntx, nty, ntz);
vw = GetPlayerVirtualWorld(i);
nti = GetPlayerInterior(i);
SetVehiclePos(playercar, tex, tey, tez);
SetVehicleZAngle(playercar, teang);
LinkVehicleToInterior(playercar, teint);
SetVehicleVirtualWorld(playercar, tevw);
SetPlayerPos(i, ntx, nty, ntz);
SetPlayerVirtualWorld(i, vw);
SetPlayerInterior(i, nti);
}
}
}
}
}
else print("Funзгo nгo executada. Motivo: o jogador nгo estб em um veнculo.");
return 1;
}