RemovePlayerFromVehicle - 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: RemovePlayerFromVehicle (
/showthread.php?tid=430036)
RemovePlayerFromVehicle -
NeroX98 - 12.04.2013
Hi guys...
I have a problem with this function. the function DOESN'T WORK
Code:
pawn Код:
if(dialogid == 11112)
{
if(response)
{
// MY CODE
}
else
{
RemovePlayerFromVehicle(playerid);
TogglePlayerControllable(playerid, 1);
}
}
The code is about renting... If he doesn't want to rent than the removeplayerfromvehicle should run but the function doesn't work.
Re: RemovePlayerFromVehicle -
HurtLocker - 12.04.2013
pawn Код:
if(dialogid == 11112)
{
if(response)
{
// MY CODE
}
else
{
RemovePlayerFromVehicle(playerid);
TogglePlayerControllable(playerid, 1);
}
return 1;
}
HELLAS[MAKEDONIA]
Re: RemovePlayerFromVehicle -
MP2 - 12.04.2013
You're not even changing anything that makes a difference. The return doesn't matter - it's called AFTER.
Debug it to see if it's being called.
Re: RemovePlayerFromVehicle -
Jstylezzz - 12.04.2013
I had this problem too, the thing I did is call the function twice, and as I recall it worked for me.
Also debug as MP2 said.
Re: RemovePlayerFromVehicle -
MP2 - 12.04.2013
It should be noted that at certain speeds, players are unable to exit the vehicle. The vehicle either has to be going pretty slow or pretty fast for it to work. An alternative could be SetPlayerPos, but this probably isn't want you want as it will just teleport them out.