NFS system car
#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


Messages In This Thread
NFS system car - by KamilPolska - 13.05.2018, 12:33
Re: NFS system car - by GTLS - 14.05.2018, 06:59
Re: NFS system car - by KamilPolska - 14.05.2018, 18:03
Re: NFS system car - by CodeStyle175 - 14.05.2018, 18:34
Re: NFS system car - by KamilPolska - 14.05.2018, 18:59
Re: NFS system car - by CodeStyle175 - 14.05.2018, 19:48
Re: NFS system car - by KamilPolska - 14.05.2018, 20:49

Forum Jump:


Users browsing this thread: 1 Guest(s)