NFS system car - 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: NFS system car (
/showthread.php?tid=653805)
NFS system car -
KamilPolska - 13.05.2018
How to make such a car buying system?
https://www.youtube.com/watch?v=J9hhHg72N0w
Re: NFS system car -
GTLS - 14.05.2018
They have used TextDraws to display and they have Checked Keys pressed for vehicle spawn. CreateVehicle and DestroyVehicle once an arrow key is pressed. Set player's camera angle accordingly as well.
Re: NFS system car -
KamilPolska - 14.05.2018
Thank you for the tips
Re: NFS system car -
CodeStyle175 - 14.05.2018
Well it's very time wasteful to make this system, because calibrating it to perfection takes a lot time and its simplier to make just simpler buting dialog for vehicles and it works well.
And to make this system optimized also takes some scripting skills.
Re: NFS system car -
KamilPolska - 14.05.2018
Right. I wanted to do a tuning system for the vehicle on textdraw. The only problem I have is getting back to the normal state of the vehicle after clicking the Cancel button.
Re: NFS system car -
CodeStyle175 - 14.05.2018
well you could create temporary array for tunings and when cancel is pressed, everything from array is removed.
PHP код:
new arrTempComps[max_players][14];
AddCompForPreview(pid,vid,comp){
arrTempComps[pid][GetVehicleComponentType(comp)]=comp;
AddVehicleComponent(vid,comp);
return 1;
}
SavePreviewComps(pid,vid){
for(new i; i < 14; i++){
Vehicle[vid][Tuning][i]=arrTempsComps[pid][i];
}
new s[120];
format(s,120,"update vehs set tune0...");
mysql_tquery(con0,s);
return 1;
}
RemovePreviewComps(pid,vid){
for(new i; i < 14; i++)if(arrTempComps[pid][i])RemoveVehicleComponent(vid,arrTempComps[i]),arrTempComps[i]=0;
return 1;
}
Re: NFS system car -
KamilPolska - 14.05.2018
Thanks! If I have a problem, I will write a new topic.