SA-MP Forums Archive
[Question] How make vehicle browser - 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: [Question] How make vehicle browser (/showthread.php?tid=295505)



[Question] How make vehicle browser - juraska - 06.11.2011

How make vehicle browser ? with keystate Key_up change vehicle Key_down previous vehicle


Re: [Question] How make vehicle browser - Pinguinn - 06.11.2011

You could try something like this;


at the top

pawn Код:
new _vehicle;
at the command to browse thrue the vehicles

pawn Код:
_vehicle = CreateVehicle(400, ..);
pawn Код:
new vehicle = 400;

if(vehicle < 400) {
    vehicle = 611;
} else if(vehicle > 611) {
    vehicle = 400;
}

if(newkeys & KEY_UP) {
    vehicle += 1;
    DestroyVehicle(_vehicle);
    _vehicle = CreateVehicle(vehicle, ...);
} else if(newkeys & KEY_DOWN) {
    vehicle -= 1;
    DestroyVehicle(_vehicle);
    _vehicle = CreateVehicle(vehicle, ...);
}



Re: [Question] How make vehicle browser - juraska - 06.11.2011

Thanks. Respect