it's possible? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: it's possible? (
/showthread.php?tid=565522)
it's possible? -
Antoniohl - 28.02.2015
i have custom interior for my garage system
when people entering it they start falling, i have tried multiple times to fix it, but i don't know how.
it works fine if you have no vehicle.
it's possible to freeze the vehicle or something? because it only freezes the players
Notice: it works in my home host perfect because dat ping is low..
LoadObjects it shows a textdraw and freezes the players.
Код:
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
new tmpcar = GetPlayerVehicleID(playerid);
if(IsPlayerInVehicle(playerid, tmpcar))
{
SetPlayerVirtualWorld(playerid, idx+10);
SetPlayerInterior(playerid,0);
SetVehicleVirtualWorld(tmpcar, idx+10);
LinkVehicleToInterior(tmpcar, 0);
LoadObjects(playerid);
SetVehiclePos(tmpcar,InfoGarage[idx][gInteriorX],InfoGarage[idx][gInteriorY],InfoGarage[idx][gInteriorZ]+3);
SetVehicleZAngle(tmpcar,InfoGarage[idx][gInteriorA]);
format(string, sizeof(string), "* Welcome, %s - Type /park , to park your vehicle - (To get out type /exit) **", PlayerName(playerid));
SendClientMessage(playerid, COLOR_BLANCO, string);
return 1;
}
}
Re: it's possible? -
HY - 28.02.2015
I don't think it's possible because sa-mp doesn't have a
ToggleVehicleControllable() function, but this should be added because it's useful.
Respuesta: it's possible? -
CuervO - 28.02.2015
Doesn't the streamer have a function to preload objects?
Код:
Use Streamer_UpdateEx to preload items before setting a player's position or to stream items under OnPlayerRequestClass.
If that doesn't work just teleport the player then use a timer to shortly teleport the vehicle and put the player inside. GetPlayerPing + 1 second should be enough.
Re: it's possible? -
Antoniohl - 28.02.2015
Quote:
Originally Posted by HY
I don't think it's possible because sa-mp doesn't have a ToggleVehicleControllable() function, but this should be added because it's useful.
|
indeed, we need it :/
Re: Respuesta: it's possible? -
Antoniohl - 28.02.2015
Quote:
Originally Posted by CuervO
Doesn't the streamer have a function to preload objects?
Код:
Use Streamer_UpdateEx to preload items before setting a player's position or to stream items under OnPlayerRequestClass.
If that doesn't work just teleport the player then use a timer to shortly teleport the vehicle and put the player inside. GetPlayerPing + 1 second should be enough.
|
man thanks a lot.
EDIT: fixed man, you're genius xD
Re: it's possible? -
$$inSane - 28.02.2015
Quote:
Originally Posted by HY
I don't think it's possible because sa-mp doesn't have a ToggleVehicleControllable() function, but this should be added because it's useful.
|
That is possible with PAWN.
Not efficient though!