SHARE
TWEET

Untitled

a guest Mar 17th, 2019 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ocmd:efas(playerid,params[]){  /// FactionCars[fc][fVehid] wird verwendet irgendwo noch... oder ?
  2.             if(PlayerInfo[playerid][pAdmin] == 2002)
  3.             {
  4.                 new vehid,col1,col2,fracid;
  5.                 if(sscanf(params,"dddd",vehid,col1,col2,fracid)) return SendClientMessage(playerid,FACTION_COL_GREY,"Benutze: '/efa [Model] [Farbe(1)] [Farbe(2)] [Hauptfraktion]'.");
  6.                 if(vehid < 400 || vehid > 611) return SendClientMessage(playerid,FACTION_COL_GREY,"Vehicle-ID nur von 400 bis 611.");
  7.                 if(col1 < 0 || col1 > 255) return SendClientMessage(playerid,FACTION_COL_GREY,"Falsche Farbe(1)!");
  8.                 if(col2 < 0 || col2 > 255) return SendClientMessage(playerid,FACTION_COL_GREY,"Falsche Farbe(2)!");
  9.                 if(fracid <1 || fracid > 24) return SCM(playerid,-1,"FracID nicht kleiner als 1 oder höher als 25!"); // falls 0 oder höher als 25
  10.        
  11.            
  12.            
  13.                 for(new fc=0; fc<sizeof(FactionCars); fc++)
  14.                 {
  15.                     if(FactionCars[fc][fVehid] != 0) continue;
  16.                     new Float:fX,Float:fY,Float:fZ,Float:fA;
  17.                     GetPlayerPos(playerid,fX,fY,fZ),GetPlayerFacingAngle(playerid,fA);
  18.  
  19.        
  20.                     FactionCars[fc][fPos][0] = fX;
  21.                     FactionCars[fc][fTuning][16] = 100;
  22.                     FactionCars[fc][fPos][1] = fY;
  23.                     FactionCars[fc][fPos][2] = fZ;
  24.                     FactionCars[fc][fPos][3] = fA;
  25.                     FactionCars[fc][fCol][0] = col1;
  26.                     FactionCars[fc][fCol][1] = col2;
  27.                     FactionCars[fc][fFaction] = fracid;
  28.                     FactionCars[fc][fPrice] = 0;
  29.  
  30.                     for(new mood;mood<16;mood++)
  31.                     {
  32.                         FactionCars[fc][fTuning][mood] = 0;}
  33.  
  34.  
  35.                     FactionCars[fc][fCarid] = CreateVehicle(FactionCars[fc][fVehid],FactionCars[fc][fPos][0],FactionCars[fc][fPos][1],FactionCars[fc][fPos][2],FactionCars[fc][fPos][3],FactionCars[fc][fCol][0],FactionCars[fc][fCol][1],-1, 0);
  36.        
  37.                     SendClientMessage(playerid,COLOR_LIGHTBLUE,"Du hast das Fraktions Fahrzeug erfolgreich erstellt.");
  38.                     SendClientMessage(playerid,COLOR_LIGHTBLUE,"Vergesse es nicht mit '/parken' umzuparken.");
  39.                     PutPlayerInVehicle(playerid,FactionCars[fc][fCarid],0);
  40.                     SaveFrakCarToDB(playerid,fc);
  41.                     return 1;
  42.                 }
  43.             }else SendClientMessage(playerid,FACTION_COL_GREY,"Du bist nicht berechtigt diesen Befehl anzuwenden.");
  44.             return 1;
  45. }
  46.  
  47. + LoadFactionCars veränderte Stellen
  48.  
  49.  
  50.  
  51.  
  52.  
  53. public LoadFactionCars(){
  54.  
  55.  
  56.        
  57.     new rows,fc;
  58.     cache_get_row_count(rows);
  59.     if(rows)
  60.     {
  61.         for(new i; i<rows; i++)
  62.         {
  63.  
  64.         fc = i;
  65.         cache_get_value_name_int(i, "factioncardbid", FactionCars[fc][factioncardbid]);
  66.         cache_get_value_name_int(i, "fVehid", FactionCars[fc][fVehid]);
  67.         cache_get_value_name_int(i, "fCol", FactionCars[fc][fCol][0]);
  68.         cache_get_value_name_int(i, "fCol", FactionCars[fc][fCol][1]);
  69.         cache_get_value_name_int(i, "fFaction", FactionCars[fc][fFaction]);
  70.         cache_get_value_name_int(i, "fPrice", FactionCars[fc][fPrice]);
  71.        
  72.         cache_get_value_name_float(i, "fPosx", FactionCars[fc][fPos][0]);
  73.         cache_get_value_name_float(i, "fPosy", FactionCars[fc][fPos][1]);
  74.         cache_get_value_name_float(i, "fPosz", FactionCars[fc][fPos][2]);
  75.         cache_get_value_name_float(i, "fPosr", FactionCars[fc][fPos][3]);
  76.        
  77.        
  78.        
  79.         cache_get_value_name_int(i, "fTuning0", FactionCars[fc][fTuning][0]);
  80.         cache_get_value_name_int(i, "fTuning1", FactionCars[fc][fTuning][1]);
  81.         cache_get_value_name_int(i, "fTuning2", FactionCars[fc][fTuning][2]);
  82.         cache_get_value_name_int(i, "fTuning3", FactionCars[fc][fTuning][3]);
  83.         cache_get_value_name_int(i, "fTuning4", FactionCars[fc][fTuning][4]);
  84.         cache_get_value_name_int(i, "fTuning5", FactionCars[fc][fTuning][5]);
  85.         cache_get_value_name_int(i, "fTuning6", FactionCars[fc][fTuning][6]);
  86.         cache_get_value_name_int(i, "fTuning7", FactionCars[fc][fTuning][7]);
  87.         cache_get_value_name_int(i, "fTuning8", FactionCars[fc][fTuning][8]);
  88.         cache_get_value_name_int(i, "fTuning9", FactionCars[fc][fTuning][9]);
  89.         cache_get_value_name_int(i, "fTuning10", FactionCars[fc][fTuning][10]);
  90.         cache_get_value_name_int(i, "fTuning11", FactionCars[fc][fTuning][11]);
  91.         cache_get_value_name_int(i, "fTuning12", FactionCars[fc][fTuning][12]);
  92.         cache_get_value_name_int(i, "fTuning13", FactionCars[fc][fTuning][13]);
  93.         cache_get_value_name_int(i, "fTuning14", FactionCars[fc][fTuning][14]);
  94.         cache_get_value_name_int(i, "fTuning15", FactionCars[fc][fTuning][15]);
  95.         cache_get_value_name_int(i, "fTuning16", FactionCars[fc][fTuning][16]);
  96.         cache_get_value_name_int(i, "fTuning17", FactionCars[fc][fTuning][17]);
  97.         FactionCars[fc][fCarid] = CreateVehicle(FactionCars[fc][fVehid],FactionCars[fc][fPos][0],FactionCars[fc][fPos][1],FactionCars[fc][fPos][2],FactionCars[fc][fPos][3],FactionCars[fc][fCol][0],FactionCars[fc][fCol][1],-1,FactionCars[fc][fTuning][14]);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top