How to? -> 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: How to? -> RemovePlayerFromVehicle (
/showthread.php?tid=138284)
How to? -> RemovePlayerFromVehicle -
g@k - 01.04.2010
Hi..
How to remove player from his vehicle with a vehicle ID list ?
ty
Re: How to? -> RemovePlayerFromVehicle -
[MWR]Blood - 01.04.2010
I don't know what u mean with 'Vehicle ID list", but here's the code:
pawn Код:
RemovePlayerFromVehicle(playerid);
Re: How to? -> RemovePlayerFromVehicle -
g@k - 01.04.2010
When a player is on a vehicle (exemple 520, 562...) remove him from his car with a timer
Re: How to? -> RemovePlayerFromVehicle -
rOlInG - 01.04.2010
Quote:
Originally Posted by g@k
Hi..
How to remove player from his vehicle with a vehicle ID list ?
ty
|
Did you check
Sa-mp wikki?
Re: How to? -> RemovePlayerFromVehicle -
Correlli - 01.04.2010
Quote:
Originally Posted by rOlInG
|
That's not SA:MPs wiki.
This is the correct link -
http://wiki.sa-mp.com
Re: How to? -> RemovePlayerFromVehicle -
RSX - 01.04.2010
Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
switch(GetVehicleModel(vehicleid))
{
case 520,562: RemovePlayerFromVehicle(playerid);
}
}
Re: How to? -> RemovePlayerFromVehicle -
g@k - 01.04.2010
I have already search on the wiki and i need to add a timer to this function because if i don't put the timer it will not work
Re: How to? -> RemovePlayerFromVehicle -
Correlli - 01.04.2010
Quote:
Originally Posted by RSX
Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
switch(GetVehicleModel(vehicleid))
{
case 520,562: RemovePlayerFromVehicle(playerid);
}
}
|
That won't work because OnPlayerEnterVehicle is called when player presses the vehicle enter key and if he's near any vehicle but he isn't IN the vehicle, so he can't be removed. Use the OnPlayerStateChange and check for states.
Re: How to? -> RemovePlayerFromVehicle -
g@k - 01.04.2010
Okay i get to try it and paste my pwn code
Re: How to? -> RemovePlayerFromVehicle -
g@k - 01.04.2010
Sorry for double post:
Код:
public OnPlayerStateChange(playerid,vehicleid,newstate,oldstate)
{
switch(GetVehicleModel(vehicleid))
{
case 520,562: RemovePlayerFromVehicle(vehicleid);
}
return 1;
}
Results :
Код:
error 025: function heading differs from prototype