NFS system car
#1

How to make such a car buying system?

https://www.youtube.com/watch?v=J9hhHg72N0w
Reply
#2

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.
Reply
#3

Thank you for the tips
Reply
#4

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.
Reply
#5

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.
Reply
#6

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 
i14i++){
        
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 
i14i++)if(arrTempComps[pid][i])RemoveVehicleComponent(vid,arrTempComps[i]),arrTempComps[i]=0;
    return 
1;

Reply
#7

Thanks! If I have a problem, I will write a new topic.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)