SA-MP Forums Archive
[HELP] vehicle exhibit - 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: [HELP] vehicle exhibit (/showthread.php?tid=468782)



[HELP] vehicle exhibit - Luca12 - 10.10.2013

I add on my server exhibit vehicle and I want when player try to enter the vehicle then he can't enter if you know what I mean? Thanks


Re: [HELP] vehicle exhibit - EiresJason - 10.10.2013

Do you create the vehicles in OnGameModeInit?

If you do, do something like this:
pawn Код:
#define MAX_EXHIBIT_CARS 50
new ExhibitCars[MAX_EXHIBIT_CARS];

public OnGameModeInit()
{
    ExhibitCars[0] = CreateVehicle(/*code*/);
    ExhibitCars[1] = CreateVehicle(/*code*/);
    ExhibitCars[2] = CreateVehicle(/*code*/);
    ExhibitCars[3] = CreateVehicle(/*code*/);
    ExhibitCars[4] = CreateVehicle(/*code*/);
    ExhibitCars[5] = CreateVehicle(/*code*/);
    for(new i=1;i<MAX_EXHIBIT_CARS;i++)
    {
        if(ExhibitCars[i] != 0) SetVehicleParamsEx(ExhibitCars[i], 0, 0, 0, 0, 0, 0, 0);
    }
    return 1;
}