Advertisement
Guest User

Efa System hilfe

a guest
Nov 1st, 2014
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.75 KB | None | 0 0
  1. dcmd_efa(playerid,params[])
  2. {
  3. if(GetPlayerAdminLevel(playerid) >= NEEDED_ADMINLEVEL){
  4. new vehid,col1,col2,faction[5];
  5. if(!sscanf(params,"dddd",vehid,col1,col2,faction[0])){
  6. sscanf(params,"dddddddd",vehid,col1,col2,faction[0],faction[1],faction[2],faction[3],faction[4]);
  7. if(vehid < 400 || vehid > 611) return SendClientMessage(playerid,FACTION_COL_GREY,"Vehicle-ID nur von 400
  8. bis 611.");
  9. if(col1 < 0 || col1 > 255) return SendClientMessage(playerid,FACTION_COL_GREY,"Falsche Farbe(1)!");
  10. if(col2 < 0 || col2 > 255) return SendClientMessage(playerid,FACTION_COL_GREY,"Falsche Farbe(2)!");
  11. if(faction[0] && faction[0] <= MAX_FACTIONS){
  12. for(new f;f<5;f++){
  13. if(faction[f] <= 0 || faction[f] > MAX_FACTIONS){
  14. faction[f] = -255;
  15. }
  16. }
  17. for(new fc;fc<sizeof(FactionCars);fc++)
  18. {
  19. if(FactionCars[fc][fVehid] < 400 || FactionCars[fc][fVehid] > 611){
  20. FactionCars[fc][fVehid] = vehid;
  21. new Float:fX,Float:fY,Float:fZ,Float:fA;
  22. GetPlayerPos(playerid,fX,fY,fZ),GetPlayerFacingAngle(playerid,fA);
  23. FactionCars[fc][fPos][0] = fX;
  24. FactionCars[fc][fPos][1] = fY;
  25. FactionCars[fc][fPos][2] = fZ;
  26. FactionCars[fc][fPos][3] = fA;
  27. FactionCars[fc][fCol][0] = col1;
  28. FactionCars[fc][fCol][1] = col2;
  29. for(new f;f<5;f++){
  30. FactionCars[fc][fFaction][f] = faction[f];
  31. }
  32. FactionCars[fc][fPrice] = 0;
  33. for(new mood;mood<14;mood++)
  34. FactionCars[fc][fTuning][mood] = 0;
  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],-255);
  36. #if defined FACTION_CARS_LOCKABLE
  37. FactionCars[fc][fLock] = true;
  38. #endif
  39. SendClientMessage(playerid,FACTION_COL_YELLOW,"Du hast das Fraktionsfahrzeug erfolgreich erstellt.");
  40. SendClientMessage(playerid,FACTION_COL_YELLOW,"Vergesse es nicht mit '/fpark' umzuparken.");
  41. PutPlayerInVehicle(playerid,FactionCars[fc][fCarid],0);
  42. return true;
  43. }
  44. }SendClientMessage(playerid,FACTION_COL_GREY,"Die Maximale Anzahl von Fraktionsfahrzeugen wurde bereits erreicht.");
  45. }else SendClientMessage(playerid,FACTION_COL_GREY,"Falsche Fraktion!");
  46. }else SendClientMessage(playerid,FACTION_COL_GREY,"Benutze: '/efa [Model] [Farbe(1)] [Farbe(2)] [Hauptfraktion]'.");
  47. }else SendClientMessage(playerid,FACTION_COL_GREY,"Du bist nicht berechtigt diesen Befehl anzuwenden.");
  48. return true;
  49. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement