SA-MP Forums Archive
Vehicle system - 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: Vehicle system (/showthread.php?tid=305704)



Vehicle system - ChristofferHoffmann - 23.12.2011

Hello guys

I'm looking for a way to make a vehicle only allowed for a faction, therefore I'm looking for a way to make sure that it kicks those people out of the vehicle who does not have the right skin (Example. Medic skin for ambulances).

If somebody could make a sample code on how i could make it, I'd appreciate it very much Since my old system bugged.


Re: Vehicle system - §с†¶e®РµРe - 23.12.2011

use OnPlayerEnterVehicle like that if a player enters vehicle id x and his faction is not x he will be removed from vehicle


Re: Vehicle system - ChristofferHoffmann - 23.12.2011

Quote:
Originally Posted by §с†¶e®РµРe
Посмотреть сообщение
use OnPlayerEnterVehicle like that if a player enters vehicle id x and his faction is not x he will be removed from vehicle
Uhm, not really sure. I tried with this, didn't work:

Код:
else if(GetVehicleModel(vehicleid) == 416 && !ispassenger) {
        if(PlayerInfo[playerid][pMember] != 3) {
            new Float:cx, Float:cy, Float:cz;
            GetPlayerPos(playerid, cx, cy, cz);
            SetPlayerPos(playerid, cx,  cy, cz);
            SendClientMessage(playerid,COLOR_LIGHTRED," You're now allowed to drive this vehicle!");



Re: Vehicle system - ChristofferHoffmann - 24.12.2011

Bump?