vehicleid - 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: vehicleid (
/showthread.php?tid=662658)
vehicleid -
Kevinas100 - 07.01.2019
PHP код:
public OnPlayerDisconnect(playerid, reason)
{
savevehs(vehicleid);
return 1;
}
is there any way to add a new vehicleid = that would get the vehicleid or model ?
Re: vehicleid -
RogueDrifter - 07.01.2019
GetPlayerVehicleID(playerid)
Re: vehicleid -
Kevinas100 - 07.01.2019
Quote:
Originally Posted by RogueDrifter
GetPlayerVehicleID(playerid)
|
I forgot to mention that it has to be not only the vehicle the player is in
Re: vehicleid -
aKnoxx - 07.01.2019
PHP код:
new vehicleid;
vehicleid = GetPlayerVehicleID(playerid);
PHP код:
new vehicleid, vehiclemodel;
vehicleid = GetPlayerVehicleID(playerid);
vehiclemodel = GetVehicleModel(vehicleid);
Quote:
Originally Posted by Kevinas100
I forgot to mention that it has to be not only the vehicle the player is in
|
You gotta save the vehicleid in a global "new vehicleid;" of the vehicles you want to save then. And use that.
Re: vehicleid -
KrYpToDeN - 08.01.2019
I think (but i'm, not sure), that if you will use this function in OnPlayerDisconnect, it can be = underfined.
Test it.
But the best way to write it into global variable in OnPlayerEnterVehicle/OnPlayerExitVehicle/OnPlayerStateChange.
And you can do with this variable in OnPlayerDisconnect what you want.