Advertisement
Gireada

Sistem Vehicule Personale V2

Feb 20th, 2013
295
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 49.07 KB | None | 0 0
  1. #include <a_samp>
  2. #include <dini>
  3. #include <sscanf2>
  4. #include <zcmd>
  5.  
  6. #define PURPLE 0xFF00FFFF
  7.  
  8. new VanzatorVeh[MAX_PLAYERS];
  9. new carsshow[MAX_PLAYERS];
  10. new IDVehicul[MAX_PLAYERS];
  11. new PretVehicul[MAX_PLAYERS];
  12. new neonon[MAX_VEHICLES];
  13. new neon[MAX_VEHICLES][5];
  14. new motoron[MAX_VEHICLES];
  15. new Text3D:vtextlabel[1000];
  16.  
  17.  
  18. new maxperscar = 9;//Numarul maxim de vehicule pe care un jucator le poate avea
  19. new buyablecars = 90;//Cate vehicule ai pe server +1;
  20.  
  21. forward LoadCar();
  22. forward SaveCar();
  23. forward SaveThisCar(vehid);
  24. forward IsAnOwnableCar(vehicleid);
  25. forward IsAtDealership(playerid);
  26. forward ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5);
  27. forward SendAdminMesaj(color,const string[]);
  28. forward GetDistanceToCar(playerid,carid);
  29. forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z);
  30.  
  31. enum PlayerData
  32. {
  33.     pLoggedIn,
  34.     pVehicule,
  35.  
  36. }
  37. new PlayerInfo[MAX_PLAYERS][PlayerData];
  38.  
  39. enum vInfo
  40. {
  41.     Model,
  42.     Float:Locatiex,
  43.     Float:Locatiey,
  44.     Float:Locatiez,
  45.     Float:Rotatie,
  46.     Valoare,
  47.     Culoare1,
  48.     Culoare2,
  49.     Propietar[MAX_PLAYER_NAME],
  50.     Cumparata,
  51.     Inchisa,
  52.     Neon,
  53.     Numar,
  54.     PaintJob,
  55. }
  56.  
  57. new VehInfo[MAX_VEHICLES][vInfo];
  58.  
  59. public OnGameModeInit()
  60. {
  61.     LoadCar();
  62.     return 1;
  63. }
  64.  
  65. public OnFilterScriptInit()
  66. {
  67.    
  68.     print("\n--------------------------------------");
  69.     print(" Vehicule personale by Gireada");
  70.     print("--------------------------------------\n");
  71.     for(new veh = buyablecars; veh < MAX_VEHICLES; veh++)
  72.     {
  73.         SetVehicleParamsEx(veh,false,false,false,VehInfo[veh][Inchisa],false,false,false);
  74.         motoron[veh] = 0;
  75.         return 1;
  76.     }
  77.     return 1;
  78. }
  79.  
  80. public OnFilterScriptExit()
  81. {
  82.     SaveCar();
  83.     return 1;
  84. }
  85.  
  86. main()
  87. {
  88.     print("\n----------------------------------");
  89.     print(" Vehicule personale by Gireada");
  90.     print("----------------------------------\n");
  91. }
  92.  
  93. public IsAtDealership(playerid)
  94. {
  95.     if(IsPlayerConnected(playerid))
  96.     {
  97.         if(PlayerToPoint(25.0,playerid,2128.0864,-1135.3912,25.5855) || PlayerToPoint(50,playerid,537.3366,-1293.2140,17.2422) || PlayerToPoint(35,playerid,2521.5544,-1524.4504,23.8365) || PlayerToPoint(50,playerid,2155.0146,-1177.3333,23.8211) || PlayerToPoint(50,playerid,299.1723,-1518.6627,24.6007) || PlayerToPoint(50,playerid,221.6332,-1952.4972,-0.5304) || PlayerToPoint(50,playerid,223.8193,-1905.8246,-0.5363) || PlayerToPoint(50,playerid,1258.2405,-1817.7858,13.4052))
  98.         {
  99.             return 1;
  100.         }
  101.     }
  102.     return 0;
  103. }
  104.  
  105. public PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
  106. {
  107.     new Float:oldposx, Float:oldposy, Float:oldposz;
  108.     new Float:tempposx, Float:tempposy, Float:tempposz;
  109.     GetPlayerPos(playerid, oldposx, oldposy, oldposz);
  110.     tempposx = (oldposx -x);
  111.     tempposy = (oldposy -y);
  112.     tempposz = (oldposz -z);
  113.     //printf("DEBUG: X:%f Y:%f Z:%f",posx,posy,posz);
  114.     if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
  115.     {
  116.         return 1;
  117.     }
  118.     return 1;
  119.  
  120. }
  121.  
  122. public IsAnOwnableCar(vehicleid)
  123. {
  124.     if(vehicleid >= buyablecars && vehicleid <= 1000) { return 1; }
  125.     return 0;
  126. }
  127.  
  128. CMD:asellcar(playerid, params[])
  129. {
  130.     new file[512], string[256], string2[256];
  131.     new Float:x, Float:y, Float:z;
  132.     GetPlayerPos(playerid, x, y, z);
  133.     new carid = GetPlayerVehicleID(playerid);
  134.     new Dealer[MAX_PLAYER_NAME];
  135.     format(Dealer, 32 ,"Dealer");
  136.     new name[MAX_PLAYER_NAME];
  137.     GetPlayerName(playerid, name, sizeof(name));
  138.     if(IsPlayerAdmin(playerid))
  139.     {
  140.         if(IsPlayerConnected(playerid))
  141.         {
  142.             if(!IsAnOwnableCar(carid))
  143.             {
  144.                 SendClientMessage(playerid, 0xFFFFFFFF, "Acest vehicul apartine unei factiuni/job");
  145.             }
  146.             if(IsAtDealership(playerid))
  147.             {
  148.                 SendClientMessage(playerid, 0xFFFFFFFF, "Trebuie sa fii la dealer");
  149.             }
  150.             if(VehInfo[carid][Propietar] != Dealer[playerid] && VehInfo[carid][Cumparata] == 1)
  151.             {
  152.                 format(file, sizeof(file), "JucatoriVehicule/%s.ini", VehInfo[carid][Propietar]);
  153.                 dini_IntSet(file,"Vehicule",PlayerInfo[playerid][pVehicule]-1); VehInfo[carid][Cumparata] = 0;
  154.                 strmid(VehInfo[carid][Numar], "DeVanzare", 0, strlen("DeVanzare"), 999); SetVehicleNumberPlate(carid,VehInfo[carid][Numar]);
  155.                 VehInfo[carid][Locatiex] = x;  VehInfo[carid][Locatiey] = y; VehInfo[carid][Locatiez] = z; VehInfo[carid][Rotatie]= 1;
  156.                 strmid(VehInfo[carid][Propietar], "Dealer", 0, strlen("Dealer"), 999); VehInfo[carid][Cumparata] = 0; VehInfo[carid][Neon] = 0;
  157.                 format(string, sizeof(string), " Vehiculul %d a fost vandut cu succes. Felicitari!.", carid);
  158.                 SendClientMessage(playerid, 0xFFFFFFFF, string);
  159.                 format(string, sizeof(string), " %s a vandut vehiculul %d.",name, carid);
  160.                 SendAdminMesaj(0xFFFFFFFF,string);
  161.                 format(string2, sizeof(string2), " DeVanzare\n Model: %s \n Pret: %d",VehInfo[carid][Propietar], VehInfo[carid][Valoare]);
  162.                 Update3DTextLabelText(vtextlabel[carid], 0x7FFF00FF, string2);
  163.             }
  164.             else
  165.             {
  166.                 SendClientMessage(playerid, 0xFFFFFFFF, "Acest vehicul este deja de vanzare");
  167.             }
  168.         }
  169.         else
  170.         {
  171.             SendClientMessage(playerid, 0xFFFFFFFF, "Trebuie sa fii conectat");
  172.         }
  173.     }
  174.     else
  175.     {
  176.         SendClientMessage(playerid, 0xFFFFFFFF, "Trebuie sa fii admin RCON");
  177.     }
  178.     return 1;
  179. }
  180. CMD:cumparaneon(playerid, params[])
  181. {
  182.     new tip;
  183.     new vehid = GetPlayerVehicleID(playerid);
  184.     new name[MAX_PLAYERS];
  185.     GetPlayerName(playerid,name,sizeof(name));
  186.     if(unformat(params, "i", tip))
  187.     {
  188.             SendClientMessage(playerid, 0xFFFFFFFF, "Foloseste: /cumparaneon <culoare>");
  189.             return 1;
  190.     }
  191.     if(!(tip>0 && tip < 7))
  192.     {
  193.         SendClientMessage(playerid, 0xFFFFFFFF, "Culori neon:");
  194.         SendClientMessage(playerid, 0xFFFFFFFF, "1.Rosu 2.Verde");
  195.         SendClientMessage(playerid, 0xFFFFFFFF, "3.Verde Lamai 4.Abastru");
  196.         SendClientMessage(playerid, 0xFFFFFFFF, "5.Alb 6.Violet");
  197.     }
  198.     if(IsAtDealership(playerid))
  199.     {
  200.         if(VehInfo[vehid][Propietar] == name[playerid])
  201.         {
  202.             if(neonon[vehid] == 0)
  203.             {
  204.                 if(GetPlayerMoney(playerid) >= 100)
  205.                 {
  206.                     if(tip == 1)
  207.                     {
  208.                         VehInfo[vehid][Neon] = 1;
  209.                         SendClientMessage(playerid, 0xFFFFFFFF, "Felicitari pentru noua achizitie. Te-a costat 100$");
  210.                         GivePlayerMoney(playerid, -100);
  211.                     }
  212.                     else if(tip == 2)
  213.                     {
  214.                         VehInfo[vehid][Neon] = 2;
  215.                         SendClientMessage(playerid, 0xFFFFFFFF, "Felicitari pentru noua achizitie. Te-a costat 100$");
  216.                         GivePlayerMoney(playerid, -100);
  217.                     }
  218.                     else if(tip == 3)
  219.                     {
  220.                         VehInfo[vehid][Neon] = 3;
  221.                         SendClientMessage(playerid, 0xFFFFFFFF, "Felicitari pentru noua achizitie. Te-a costat 100$");
  222.                         GivePlayerMoney(playerid, -100);
  223.                     }
  224.                     else if(tip == 4)
  225.                     {
  226.                         VehInfo[vehid][Neon] = 4;
  227.                         SendClientMessage(playerid, 0xFFFFFFFF, "Felicitari pentru noua achizitie. Te-a costat 100$");
  228.                         GivePlayerMoney(playerid, -100);
  229.                     }
  230.                     else if(tip == 5)
  231.                     {
  232.                         VehInfo[vehid][Neon] = 5;
  233.                         SendClientMessage(playerid, 0xFFFFFFFF, "Felicitari pentru noua achizitie. Te-a costat 100$");
  234.                         GivePlayerMoney(playerid, -100);
  235.                     }
  236.                     else if(tip == 6)
  237.                     {
  238.                         VehInfo[vehid][Neon] = 6;
  239.                         SendClientMessage(playerid, 0xFFFFFFFF, "Felicitari pentru noua achizitie. Te-a costat 100$");
  240.                         GivePlayerMoney(playerid, -100);
  241.                     }
  242.                 }
  243.                 else
  244.                 {
  245.                     SendClientMessage(playerid, 0xFFFFFFFF, "Nu ai destui bani. Iti trebuie 100$");
  246.                 }
  247.             }
  248.             else
  249.             {
  250.                 SendClientMessage(playerid, 0xFFFFFFFF, "Trebuie sa ai neoanele inchise");
  251.             }
  252.         }
  253.         else
  254.         {
  255.             SendClientMessage(playerid, 0xFFFFFFFF, "Aceasta nu este vehicolul tau");
  256.         }
  257.     }
  258.     else
  259.     {
  260.         SendClientMessage(playerid, 0xFFFFFFFF, "Trebuie sa fii la dealer");
  261.     }
  262.     return 1;
  263. }
  264.  
  265. CMD:vneon(playerid, params[])
  266. {
  267.     new vehid = GetPlayerVehicleID(playerid);
  268.     if(VehInfo[vehid][Neon] >= 1)
  269.     {
  270.         if(neonon[vehid] == 0)
  271.         {
  272.             if(VehInfo[vehid][Neon] == 1)
  273.             {
  274.                 neon[vehid][0] = CreateObject(18647,0,0,0,0,0,0);
  275.                 neon[vehid][1] = CreateObject(18647,0,0,0,0,0,0);
  276.                 neon[vehid][2] = CreateObject(18647,0,0,0,0,0,0);
  277.                 neon[vehid][3] = CreateObject(18647,0,0,0,0,0,0);
  278.                 AttachObjectToVehicle(neon[vehid][0], vehid, -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
  279.                 AttachObjectToVehicle(neon[vehid][1], vehid, 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
  280.                 AttachObjectToVehicle(neon[vehid][2], vehid, -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
  281.                 AttachObjectToVehicle(neon[vehid][3], vehid, 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
  282.                 neonon[vehid] = 1; SendClientMessage(playerid, 0xFFFFFFFF, "Ai aprins neonul");
  283.             }
  284.             else if(VehInfo[vehid][Neon] == 2)
  285.             {
  286.                 neon[vehid][0] = CreateObject(18649,0,0,0,0,0,0);
  287.                 neon[vehid][1] = CreateObject(18649,0,0,0,0,0,0);
  288.                 neon[vehid][2] = CreateObject(18649,0,0,0,0,0,0);
  289.                 neon[vehid][3] = CreateObject(18649,0,0,0,0,0,0);
  290.                 AttachObjectToVehicle(neon[vehid][0], vehid, -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
  291.                 AttachObjectToVehicle(neon[vehid][1], vehid, 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
  292.                 AttachObjectToVehicle(neon[vehid][2], vehid, -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
  293.                 AttachObjectToVehicle(neon[vehid][3], vehid, 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
  294.                 neonon[vehid] = 1; SendClientMessage(playerid, 0xFFFFFFFF, "Ai aprins neonul");
  295.             }
  296.             else if(VehInfo[vehid][Neon] == 3)
  297.             {
  298.                 neon[vehid][0] = CreateObject(18649,0,0,0,0,0,0);
  299.                 neon[vehid][1] = CreateObject(18649,0,0,0,0,0,0);
  300.                 neon[vehid][2] = CreateObject(18652,0,0,0,0,0,0);
  301.                 neon[vehid][3] = CreateObject(18652,0,0,0,0,0,0);
  302.                 AttachObjectToVehicle(neon[vehid][0], vehid, -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
  303.                 AttachObjectToVehicle(neon[vehid][1], vehid, 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
  304.                 AttachObjectToVehicle(neon[vehid][2], vehid, -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
  305.                 AttachObjectToVehicle(neon[vehid][3], vehid, 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
  306.                 neonon[vehid] = 1; SendClientMessage(playerid, 0xFFFFFFFF, "Ai aprins neonul");
  307.             }
  308.             else if(VehInfo[vehid][Neon] == 4)
  309.             {
  310.                 neon[vehid][0] = CreateObject(18648,0,0,0,0,0,0);
  311.                 neon[vehid][1] = CreateObject(18648,0,0,0,0,0,0);
  312.                 neon[vehid][2] = CreateObject(18648,0,0,0,0,0,0);
  313.                 neon[vehid][3] = CreateObject(18648,0,0,0,0,0,0);
  314.                 AttachObjectToVehicle(neon[vehid][0], vehid, -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
  315.                 AttachObjectToVehicle(neon[vehid][1], vehid, 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
  316.                 AttachObjectToVehicle(neon[vehid][2], vehid, -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
  317.                 AttachObjectToVehicle(neon[vehid][3], vehid, 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
  318.                 neonon[vehid] = 1; SendClientMessage(playerid, 0xFFFFFFFF, "Ai aprins neonul");
  319.             }
  320.             else if(VehInfo[vehid][Neon] == 5)
  321.             {
  322.                 neon[vehid][0] = CreateObject(18652,0,0,0,0,0,0);
  323.                 neon[vehid][1] = CreateObject(18652,0,0,0,0,0,0);
  324.                 neon[vehid][2] = CreateObject(18652,0,0,0,0,0,0);
  325.                 neon[vehid][3] = CreateObject(18652,0,0,0,0,0,0);
  326.                 AttachObjectToVehicle(neon[vehid][0], vehid, -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
  327.                 AttachObjectToVehicle(neon[vehid][1], vehid, 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
  328.                 AttachObjectToVehicle(neon[vehid][2], vehid, -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
  329.                 AttachObjectToVehicle(neon[vehid][3], vehid, 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
  330.                 neonon[vehid] = 1; SendClientMessage(playerid, 0xFFFFFFFF, "Ai aprins neonul");
  331.             }
  332.             else if(VehInfo[vehid][Neon] == 6)
  333.             {
  334.                 neon[vehid][0] = CreateObject(18651,0,0,0,0,0,0);
  335.                 neon[vehid][1] = CreateObject(18651,0,0,0,0,0,0);
  336.                 neon[vehid][2] = CreateObject(18651,0,0,0,0,0,0);
  337.                 neon[vehid][3] = CreateObject(18651,0,0,0,0,0,0);
  338.                 AttachObjectToVehicle(neon[vehid][0], vehid, -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
  339.                 AttachObjectToVehicle(neon[vehid][1], vehid, 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
  340.                 AttachObjectToVehicle(neon[vehid][2], vehid, -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
  341.                 AttachObjectToVehicle(neon[vehid][3], vehid, 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
  342.                 neonon[vehid] = 1; SendClientMessage(playerid, 0xFFFFFFFF, "Ai aprins neonul");
  343.             }
  344.         }
  345.         else if(neonon[vehid] == 1)
  346.         {
  347.             DestroyObject(neon[vehid][0]);DestroyObject(neon[vehid][1]);DestroyObject(neon[vehid][2]);DestroyObject(neon[vehid][3]); neonon[vehid] = 0;
  348.             SendClientMessage(playerid, 0xFFFFFFFF, "Ai stint neonul");
  349.         }
  350.     }
  351.     return 1;
  352. }
  353.  
  354. CMD:adestroycar(playerid, params[])
  355. {
  356.     new vehid = GetPlayerVehicleID(playerid);
  357.     new loc = GetPlayerVehicleSeat(playerid);
  358.     new name[MAX_PLAYER_NAME], file[256];
  359.     GetPlayerName(playerid, name, sizeof(name));
  360.     new string[256];
  361.     if(loc == 0)
  362.     {
  363.         if(IsPlayerAdmin(playerid))
  364.         {
  365.             format(string, sizeof(string), " %s a distrus vehiculul %d.",name, vehid);
  366.             SendAdminMesaj(0xFFFFFFFF,string);
  367.             format(file, sizeof(file), "Vehicule/%d.ini", vehid);
  368.             dini_Remove(file);
  369.         }
  370.         else
  371.         {
  372.             SendClientMessage(playerid, 0xFFFFFFFF, "Nu esti admin");
  373.         }
  374.     }
  375.     else
  376.     {
  377.         SendClientMessage(playerid, 0xFFFFFFFF, "Trebuie sa fii soferul");
  378.     }
  379.     return 1;
  380. }
  381.  
  382. CMD:apark(playerid, params[])
  383. {
  384.     new Float:x, Float:y, Float:z, Float:Angle;
  385.     GetPlayerPos(playerid, x, y, z); GetPlayerFacingAngle(playerid, Angle);
  386.     new vehid = GetPlayerVehicleID(playerid);
  387.     new loc = GetPlayerVehicleSeat(playerid);
  388.     if(IsPlayerAdmin(playerid))
  389.     {
  390.         if(IsAnOwnableCar(vehid))
  391.         {
  392.             if(loc == 0)
  393.             {
  394.                 VehInfo[vehid][Locatiex] = x;  VehInfo[vehid][Locatiey] = y; VehInfo[vehid][Locatiez] = z; VehInfo[vehid][Rotatie]= Angle;
  395.                 SetVehiclePos(vehid, x, y, z); SetVehicleZAngle(vehid, Angle);
  396.                 SendClientMessage(playerid, 0xFFFFFFFF, "Ai parcat vehiculul in aceste pozitii. Aici va fi respawnata.");
  397.             }
  398.             else
  399.             {
  400.                 SendClientMessage(playerid, 0xFFFFFFFF, "Trebuie sa fii soferul");
  401.             }
  402.         }
  403.         else
  404.         {
  405.             SendClientMessage(playerid, 0xFFFFFFFF, "Trebuie sa fii vehicul de vanzare");
  406.         }
  407.  
  408.     }
  409.     else
  410.     {
  411.         SendClientMessage(playerid, 0xFFFFFFFF, "Trebuie sa fii ADMIN RCON");
  412.     }
  413.     return 1;
  414. }
  415.  
  416. CMD:asetpret(playerid, params[])
  417. {
  418.     new vehid = GetPlayerVehicleID(playerid);
  419.     new pret, string[50], name[MAX_PLAYER_NAME];
  420.     GetPlayerName(playerid, name, sizeof(name));
  421.     new loc = GetPlayerVehicleSeat(playerid);
  422.     new string2[256];
  423.     if(unformat(params, "i", pret))
  424.     {
  425.             SendClientMessage(playerid, 0xFFFFFFFF, "Foloseste: /asetpret <pret>");
  426.             return 1;
  427.     }
  428.     if(IsPlayerAdmin(playerid))
  429.     {
  430.         if(IsAnOwnableCar(vehid))
  431.         {
  432.             if(loc == 0)
  433.             {
  434.                 VehInfo[vehid][Valoare] = pret;
  435.                 format(string, sizeof(string), "Ai setat pretul vehiculului la %d",pret);
  436.                 SendClientMessage(playerid, 0xFFFFFFFF, string);
  437.                 format(string, sizeof(string), "%s a setat pretul vehiculului %d la %d",name,vehid,pret);
  438.                 SendAdminMesaj(0xFFFFFFFF,string);
  439.                 if(VehInfo[vehid][Cumparata] == 0)
  440.                 {
  441.                     format(string2, sizeof(string2), " DeVanzare\n Model: %s \n Pret: %d",GetVehicleName(vehid), VehInfo[vehid][Valoare]);
  442.                     Update3DTextLabelText(vtextlabel[vehid], 0x7FFF00FF, string2);
  443.                     Attach3DTextLabelToVehicle(vtextlabel[vehid] , vehid, 0.0, 0.0, 0.0);
  444.                 }
  445.             }
  446.             else
  447.             {
  448.                 SendClientMessage(playerid, 0xFFFFFFFF, "Trebuie sa fii soferul");
  449.             }
  450.         }
  451.         else
  452.         {
  453.             SendClientMessage(playerid, 0xFFFFFFFF, "Trebuie sa fii vehicul de vanzare");
  454.         }
  455.  
  456.     }
  457.     else
  458.     {
  459.         SendClientMessage(playerid, 0xFFFFFFFF, "Trebuie sa fii ADMIN RCON");
  460.     }
  461.     return 1;
  462. }
  463.  
  464. CMD:setnumar(playerid, params[])
  465. {
  466.     new numar, plate[10];
  467.     new vehid = GetPlayerVehicleID(playerid);
  468.     new name5[MAX_PLAYER_NAME];
  469.     GetPlayerName(playerid, name5, sizeof(name5));
  470.     if(unformat(params, "s[3]", numar))
  471.     {
  472.             SendClientMessage(playerid, 0xFFFFFFFF, "Foloseste: /setnumar <litere>(3)");
  473.             return 1;
  474.     }
  475.     if(!(VehInfo[vehid][Propietar] == name5[playerid]))
  476.     {
  477.         SendClientMessage(playerid, 0xFFFFFFFF, "[Server-Info] Vehiculul nu este al tau");
  478.         return 1;
  479.     }
  480.     if(IsAtDealership(playerid))
  481.     {
  482.         format(plate, sizeof(plate), "LS %d %d",vehid,numar);
  483.         SetVehicleNumberPlate(vehid,plate);
  484.         strmid(VehInfo[vehid][Numar], plate, 0, strlen(plate), 999);
  485.     }
  486.     return 1;
  487. }
  488. CMD:acreatecar(playerid, params[])
  489. {
  490.     new string[256], model, valoare, culoare1, culoare2, string2[256];
  491.     new name[MAX_PLAYER_NAME];
  492.     GetPlayerName(playerid, name, sizeof(name));
  493.     if(unformat(params, "iiii", model,valoare,culoare1,culoare2))
  494.     {
  495.             SendClientMessage(playerid, 0xFFFFFFFF, "Foloseste: /acreatecar <model> <valoare> <culoare1> <culoare2>");
  496.             return 1;
  497.     }
  498.     if(!(model > 400 && model < 611))
  499.     {
  500.         SendClientMessage(playerid, 0xFFFFFFFF, "[Server-Info] Modelul trebuie cuprins intre 400 si 600");
  501.         return 1;
  502.     }
  503.     if(!(valoare > 0 && valoare < 5000000))
  504.     {
  505.         SendClientMessage(playerid, 0xFFFFFFFF, "[Server-Info] Valoarea trebuie cuprins intre 0 si 5000000$");
  506.         return 1;
  507.     }
  508.     if(!(culoare1 > 0 && culoare1 < 255))
  509.     {
  510.         SendClientMessage(playerid, 0xFFFFFFFF, "[Server-Info] Culoarea trebuie cuprins intre 0 si 255");
  511.         return 1;
  512.     }
  513.     if(!(culoare2 > 0 && culoare2 < 255))
  514.     {
  515.         SendClientMessage(playerid, 0xFFFFFFFF, "[Server-Info] Culoarea trebuie cuprins intre 0 si 255");
  516.         return 1;
  517.     }
  518.     if(!(IsAtDealership(playerid)))
  519.     {
  520.         SendClientMessage(playerid, 0xFFFFFFFF, "[Server-Info] Trebuie sa fii la Dealer");
  521.         return 1;
  522.     }
  523.     if(IsPlayerAdmin(playerid))
  524.     {
  525.         if(IsPlayerConnected(playerid))
  526.         {
  527.             new Float:x, Float:y, Float:z;
  528.             GetPlayerPos(playerid, x, y, z);
  529.             new vehicle = CreateVehicle(model,x,y,z,1,culoare1,culoare2,999999);
  530.             PutPlayerInVehicle(playerid,vehicle,0);
  531.             new vehid = GetPlayerVehicleID(playerid);
  532.             format(VehInfo[vehid][Numar], 20 ,"DeVanzare");
  533.             SetVehicleNumberPlate(vehid,VehInfo[vehicle][Numar]);
  534.             strmid(VehInfo[vehid][Numar], "DeVanzare", 0, strlen("DeVanzare"), 20);
  535.             VehInfo[vehid][Locatiex] = x;  VehInfo[vehid][Locatiey] = y; VehInfo[vehid][Locatiez] = z; VehInfo[vehid][Rotatie]= 1;
  536.             VehInfo[vehid][Model] = model; VehInfo[vehid][Valoare] = valoare; VehInfo[vehid][Culoare1] = culoare1; VehInfo[vehid][Culoare2] = culoare2;
  537.             strmid(VehInfo[vehid][Propietar], "Dealer", 0, strlen("Dealer"), 10); VehInfo[vehid][Cumparata] = 0; VehInfo[vehid][Neon] = 0;
  538.             VehInfo[vehid][PaintJob] = 3;
  539.             format(string, sizeof(string), " Vehiculul %d a fost creat cu succes. Felicitari!.", vehicle);
  540.             SendClientMessage(playerid, 0xFFFFFFFF, string);
  541.             format(string, sizeof(string), " %s a creiat vehiculul %d.",name, vehicle);
  542.             SendAdminMesaj(0xFFFFFFFF,string);
  543.             printf("%s a creiat vehiculul %d.",name, vehicle); SaveThisCar(vehicle);
  544.             format(string2, sizeof(string2), " DeVanzare\n Model: %s \n Pret: %d",GetVehicleName(vehid), VehInfo[vehid][Valoare]);
  545.             vtextlabel[vehid] = Create3DTextLabel(string2, 0x7FFF00FF, VehInfo[vehid][Locatiex], VehInfo[vehid][Locatiey], VehInfo[vehid][Locatiez], 20.0, 0, 0);
  546.             Attach3DTextLabelToVehicle( vtextlabel[vehid] , vehid, 0.0, 0.0, 0.0);
  547.  
  548.         }
  549.         else
  550.         {
  551.             SendClientMessage(playerid, 0xFFFFFFFF, "[Server-Info] Trebuie sa fii conectat.");
  552.             return 1;
  553.         }
  554.     }
  555.     else
  556.     {
  557.         SendClientMessage(playerid, 0xFFFFFFFF, "[Server-Info] Trebuie sa ai RCON ADMIN");
  558.         return 1;
  559.     }
  560.     return 1;
  561. }
  562.  
  563. CMD:vcumpara(playerid, params[])
  564. {
  565.     new name5[MAX_PLAYER_NAME], vehid = GetPlayerVehicleID(playerid);
  566.     GetPlayerName(playerid, name5, sizeof(name5));
  567.     new string2[256];
  568.     if(!(IsAtDealership(playerid)))
  569.     {
  570.         SendClientMessage(playerid, 0xFFFFFFFF, "[Server-Info] Trebuie sa fii la Dealer.");
  571.         return 1;
  572.     }
  573.     if(IsAnOwnableCar(vehid))
  574.     {
  575.         if(VehInfo[vehid][Cumparata] == 0)
  576.         {
  577.             if(PlayerInfo[playerid][pVehicule] <= maxperscar)
  578.             {
  579.                 if(GetPlayerMoney(playerid) >= VehInfo[vehid][Valoare])
  580.                 {
  581.                     strmid(VehInfo[vehid][Propietar], name5, 0, strlen(name5), 999);
  582.                     VehInfo[vehid][Cumparata] = 1; PlayerInfo[playerid][pVehicule] += 1;
  583.                     GivePlayerMoney(playerid, -VehInfo[vehid][Valoare]);
  584.                     TogglePlayerControllable(playerid, 1); SaveThisCar(vehid);
  585.                     GameTextForPlayer(playerid, "~w~Felicitari~n~Nu uita sa o parchezi cu /v park!", 5000, 3);
  586.                     SendClientMessage(playerid, 0xFFFFFFFF, "Felicitari ti-ai cumparat o masina noua!");
  587.                     format(string2, sizeof(string2), " Propietar: %s \n Model: %s",VehInfo[vehid][Propietar], GetVehicleName(vehid));
  588.                     Update3DTextLabelText(vtextlabel[vehid], 0xFF4500FF, string2);
  589.                 }
  590.                 else
  591.                 {
  592.                     SendClientMessage(playerid, 0xFFFFFFFF, "[Server-Info] Nu ai destui bani, la tine.");
  593.                     return 1;
  594.                 }
  595.             }
  596.             else
  597.             {
  598.                 SendClientMessage(playerid, 0xFFFFFFFF, "[Server-Info] Ai atins limita de vehicule personale");
  599.                 return 1;
  600.             }
  601.         }
  602.         else
  603.         {
  604.             SendClientMessage(playerid, 0xFFFFFFFF, "[Server-Info] Vehiculul nu este deja cumparat");
  605.             return 1;
  606.         }
  607.     }
  608.     else
  609.     {
  610.         SendClientMessage(playerid, 0xFFFFFFFF, "[Server-Info] Vehiculul nu este de vanzare");
  611.         SendClientMessage(playerid, 0xFFFFFFFF, "[Server-Hint] Incearca unul de la diler");
  612.         return 1;
  613.     }
  614.     return 1;
  615. }
  616.  
  617. CMD:vvinde(playerid, params[])
  618. {
  619.     new name5[MAX_PLAYER_NAME], vehid = GetPlayerVehicleID(playerid), dealer[MAX_PLAYERS], string[256];
  620.     GetPlayerName(playerid, name5, sizeof(name5));
  621.     format(dealer, sizeof(dealer), name5);
  622.     new string2[256];
  623.     new engine,lights,alarm,doors,bonnet,boot,objective;
  624.     new bani;
  625.     if(!(VehInfo[vehid][Propietar] == dealer[playerid]))
  626.     {
  627.         SendClientMessage(playerid, 0xFFFFFFFF, "[Server-Info] Vehiculul nu este al tau");
  628.         return 1;
  629.     }
  630.     if(!(IsAtDealership(playerid)))
  631.     {
  632.         SendClientMessage(playerid, 0xFFFFFFFF, "[Server-Info] Trebuie sa fii la Dealer.");
  633.         return 1;
  634.     }
  635.     if(!(IsAnOwnableCar(vehid)))
  636.     {
  637.         SendClientMessage(playerid, 0xFFFFFFFF, "[Server-Info] Trebuie sa fii vehicul de vanzare/");
  638.         return 1;
  639.     }
  640.     strmid(VehInfo[vehid][Propietar], "Dealer", 0, strlen("Dealer"), 999);
  641.     VehInfo[vehid][Cumparata] = 0; PlayerInfo[playerid][pVehicule] -= 1;
  642.     TogglePlayerControllable(playerid, 1); SaveThisCar(vehid);
  643.     bani = VehInfo[vehid][Valoare]%2;
  644.     GivePlayerMoney(playerid, VehInfo[vehid][Valoare]%2);
  645.     GameTextForPlayer(playerid, "~w~Ti-ai vandut vehicululul~n~Nu uita de bani!", 5000, 3);
  646.     format(string, sizeof(string), " Ti-ai vandut vehiculul, ai primit %d $!.", bani);
  647.     SendClientMessage(playerid, 0xFFFFFFFF, string);
  648.     GetVehicleParamsEx(vehid,engine,lights,alarm,doors,bonnet,boot,objective);
  649.     SetVehicleParamsEx(vehid,false,lights,alarm,doors,bonnet,boot,objective);
  650.     VehInfo[vehid][PaintJob] = 3;
  651.     format(string2, sizeof(string2), " DeVanzare\n Model: %s \n Pret: %d",VehInfo[vehid][Propietar], VehInfo[vehid][Valoare]);
  652.     Update3DTextLabelText(vtextlabel[vehid], 0x7FFF00FF, string2);
  653.     return 1;
  654. }
  655.  
  656. CMD:vvindelui(playerid, params[])
  657. {
  658.     new giveplayerid,valoare, vehid = GetPlayerVehicleID(playerid);
  659.     new name5[MAX_PLAYER_NAME], dealer[MAX_PLAYERS], playername[256], giveplayer[256], string[256];
  660.     GetPlayerName(playerid, name5, sizeof(name5));
  661.     if(unformat(params, "ui",giveplayerid,valoare))
  662.     {
  663.             SendClientMessage(playerid, 0xFFFFFFFF, "Foloseste: /vvindelui <playerid/name> <valoare> ");
  664.             return 1;
  665.     }
  666.     if(!(VehInfo[vehid][Propietar] == dealer[playerid]))
  667.     {
  668.         SendClientMessage(playerid, 0xFFFFFFFF, "[Server-Info] Vehiculul nu este al tau");
  669.         return 1;
  670.     }
  671.     if(!(PlayerInfo[giveplayerid][pVehicule] < maxperscar))
  672.     {
  673.         SendClientMessage(playerid, 0xFFFFFFFF, "[Server-Info] Persoana a atins limita de vehicule personale");
  674.         return 1;
  675.     }
  676.     GetPlayerName(playerid, playername, sizeof(playername));
  677.     GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
  678.     format(string, sizeof(string), "* I-ai oferit lui %s vehiculul tau pentru $%d .", giveplayer, valoare);
  679.     SendClientMessage(playerid, 0xFFFFFFFF, string);
  680.     format(string, sizeof(string), "* %s ti-a oferit veiculul lui pentru $%d (scrie {1E90FF}/accepta{FFFFFF}) pentru a o cumpara.", playername, valoare);
  681.     SendClientMessage(giveplayerid, 0xFFFFFFFF, string); SaveThisCar(vehid);
  682.     VanzatorVeh[giveplayerid] = playerid;
  683.     IDVehicul[giveplayerid] = vehid;
  684.     PretVehicul[giveplayerid] = valoare;
  685.     SetTimerEx( "VDecizion", 30000, false, "i", giveplayerid);
  686.     return 1;
  687. }
  688.  
  689. CMD:acceptav(playerid, params[])
  690. {
  691.     new string[256], vehid = GetPlayerVehicleID(playerid), name5[MAX_PLAYER_NAME], name6[MAX_PLAYER_NAME];
  692.     GetPlayerName(playerid, name5, sizeof(name5));
  693.     GetPlayerName(VanzatorVeh[playerid], name6, sizeof(name6));
  694.     new string2[256];
  695.     if(VanzatorVeh[playerid] >= 0)
  696.     {
  697.         if(GetPlayerMoney(playerid) >= PretVehicul[playerid])
  698.         {
  699.             GivePlayerMoney(VanzatorVeh[playerid], PretVehicul[playerid]);
  700.             GivePlayerMoney(playerid, -PretVehicul[playerid]);
  701.             format(string, sizeof(string), "* %s ti-a acceptat, ai primit %d.", name5, PretVehicul[playerid]);
  702.             SendClientMessage(VanzatorVeh[playerid], 0xFFFFFFFF, string);
  703.             format(string, sizeof(string), "* %s ti-a vandut vehiculul pentru %d.", name6, PretVehicul[playerid]);
  704.             SendClientMessage(playerid, 0xFFFFFFFF, string);
  705.             strmid(VehInfo[vehid][Propietar], name5, 0, strlen(name5), 999);
  706.             PlayerInfo[playerid][pVehicule] += 1; PlayerInfo[VanzatorVeh[playerid]][pVehicule] -= 1;
  707.             format(string2, sizeof(string2), " Propietar: %s \n Model: %s",VehInfo[vehid][Propietar], GetVehicleName(vehid));
  708.             Update3DTextLabelText(vtextlabel[vehid], 0xFF4500FF, string2);
  709.             VanzatorVeh[playerid] = -1; IDVehicul[playerid] = 0; PretVehicul[playerid] = 0;
  710.         }
  711.         else
  712.         {
  713.             format(string, sizeof(string), "* Nu ai destui bani iti trebuie %d", PretVehicul[playerid]);
  714.             SendClientMessage(playerid, 0xFFFFFFFF, string);
  715.             VanzatorVeh[playerid] = -1;
  716.             IDVehicul[playerid] = 0;
  717.             PretVehicul[playerid] = 0;
  718.  
  719.         }
  720.     }
  721.     else
  722.     {
  723.         SendClientMessage(playerid, 0xFFFFFFFF, "Nu ai nici o oferta");
  724.     }
  725.     return 1;
  726. }
  727.  
  728. CMD:refuzav(playerid, params[])
  729. {
  730.     new string[256], name5[MAX_PLAYER_NAME], name6[MAX_PLAYER_NAME];
  731.     GetPlayerName(playerid, name5, sizeof(name5));
  732.     if(VanzatorVeh[playerid] >= 0)
  733.     {
  734.         if(GetPlayerMoney(playerid) >= PretVehicul[playerid])
  735.         {
  736.             format(string, sizeof(string), "* %s ti-a refuzt oferta.", name5);
  737.             SendClientMessage(VanzatorVeh[playerid], 0xFFFFFFFF, string);
  738.             format(string, sizeof(string), "* % I-ai refuzat oferta lui %s.", name6);
  739.             SendClientMessage(playerid, 0xFFFFFFFF, string);
  740.             VanzatorVeh[playerid] = -1;IDVehicul[playerid] = 0;PretVehicul[playerid] = 0;
  741.         }
  742.     }
  743.     else
  744.     {
  745.         SendClientMessage(playerid, 0xFFFFFFFF, "[Server-Info] Nu ai nici o oferta, pentru a o refuza.");
  746.         return 1;
  747.     }
  748.     return 1;
  749. }
  750.  
  751. CMD:vpark(playerid, params[])
  752. {
  753.     new Float:x, Float:y, Float:z, Float:Angle, string[26], name5[MAX_PLAYERS];
  754.     GetPlayerPos(playerid, x, y, z);
  755.     GetPlayerFacingAngle(playerid, Angle);
  756.     new vehid = GetPlayerVehicleID(playerid);
  757.     GetPlayerName(playerid, name5, sizeof(name5));
  758.     if(VehInfo[vehid][Propietar] == name5[playerid])
  759.     {
  760.         if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
  761.         {
  762.             VehInfo[vehid][Locatiex] = x;  VehInfo[vehid][Locatiey] = y; VehInfo[vehid][Locatiez] = z; VehInfo[vehid][Rotatie]= Angle;
  763.             SetPlayerFacingAngle(playerid, Angle); SetVehiclePos(vehid, x, y, z); SetVehicleZAngle(vehid, Angle);
  764.             SendClientMessage(playerid, 0xFFFFFFFF, "Ai parcat vehiculul in aceste pozitii. Aici va fi respawnata.");
  765.             format(string, sizeof(string), "*  %s si-a parcat vehiculul in aceasta pozitie.", name5);
  766.             ProxDetector(30.0, playerid, string, PURPLE,PURPLE,PURPLE,PURPLE,PURPLE);
  767.             return 1;
  768.         }
  769.         else
  770.         {
  771.             SendClientMessage(playerid, 0xFFFFFFFF, "[Server-Info] Nu esti soferul.");
  772.             return 1;
  773.         }
  774.     }
  775.     else
  776.     {
  777.         SendClientMessage(playerid, 0xFFFFFFFF, "[Server-Info] Nu esti propietarul vehiculului.");
  778.     }
  779.     return 1;
  780. }
  781.  
  782. CMD:vlock(playerid, params[])
  783. {
  784.     new Float:x, Float:y, Float:z;
  785.     GetPlayerPos(playerid, x, y, z);
  786.     new name[MAX_PLAYER_NAME];
  787.     GetPlayerName(playerid, name, sizeof(name));
  788.     new loc = GetPlayerVehicleSeat(playerid);
  789.     if(GetPlayerVehicleSeat(playerid) == -1)
  790.     {
  791.         for(new carid = buyablecars; carid<MAX_VEHICLES; carid++)
  792.         {
  793.             if(GetDistanceToCar(playerid,carid) < 2.0)
  794.             {
  795.                 if(VehInfo[carid][Propietar] == name[playerid])
  796.                 {
  797.                     if(VehInfo[carid][Inchisa] == 0)
  798.                     {
  799.                         VehInfo[carid][Inchisa] = 1;
  800.                         SendClientMessage(playerid, 0xFFFFFFFF, "Ti-ai inchis vehiculul.");break;
  801.                     }
  802.                     else if(VehInfo[carid][Inchisa] == 1)
  803.                     {
  804.                         VehInfo[carid][Inchisa] = 0;
  805.                         SendClientMessage(playerid, 0xFFFFFFFF, "Ti-ai deschis vehiculul.");break;
  806.                     }
  807.                 }
  808.             }
  809.         }
  810.     }
  811.     else if(loc == 0 || loc == 1 || loc == 2 || loc == 3 || loc == 4)
  812.     {
  813.         new vehid = GetPlayerVehicleID(playerid);
  814.         if(VehInfo[vehid][Propietar] == name[playerid])
  815.         {
  816.             if(VehInfo[vehid][Inchisa] == 0)
  817.             {
  818.                 VehInfo[vehid][Inchisa] = 1; SendClientMessage(playerid, 0xFFFFFFFF, "Ti-ai inchis vehiculul.");
  819.                 return 1;
  820.             }
  821.             else if(VehInfo[vehid][Inchisa] == 1)
  822.             {
  823.                 VehInfo[vehid][Inchisa] = 0; SendClientMessage(playerid, 0xFFFFFFFF, "Ti-ai deschis vehiculul.");
  824.                 return 1;
  825.             }
  826.         }
  827.     }
  828.     return 1;
  829. }
  830.  
  831. CMD:mycars(playerid, params[])
  832. {
  833.     new name[MAX_PLAYER_NAME], string[256];
  834.     GetPlayerName(playerid, name, sizeof(name));
  835.     carsshow[playerid] = 0;
  836.     for(new vehid = buyablecars; vehid<sizeof(VehInfo); vehid++)
  837.     {
  838.         if(VehInfo[vehid][Propietar] == name[playerid])
  839.         {
  840.             if(carsshow[playerid] <= PlayerInfo[playerid][pVehicule])
  841.             {
  842.                 new value = VehInfo[vehid][Valoare]%2;
  843.                 new Neontxt[10], Statustxt[10];
  844.                 if(VehInfo[vehid][Neon] >= 1) { Neontxt = "Da"; }
  845.                 else if(VehInfo[vehid][Neon] == 0) { Neontxt = "Nu"; }
  846.                 if(VehInfo[vehid][Inchisa] == 0) { Statustxt = "Nu"; }
  847.                 else if(VehInfo[vehid][Inchisa] == 1) { Statustxt = "Da"; }
  848.                 format(string, sizeof(string), " CarID: %d, Model: %s Valoare: %d, Neon: %s, Inchisa: %s,", vehid, GetVehicleName(vehid), value, Neontxt, Statustxt);
  849.                 SendClientMessage(playerid, 0xFFFFFFFF, string); carsshow[playerid] += 1;
  850.             }
  851.         }
  852.     }
  853.     carsshow[playerid] = 0;
  854.     return 1;
  855. }
  856.  
  857. CMD:manual(playerid, params[])
  858. {
  859.     new string[1024];
  860.     strcat( string, "         {FF9094}Manual Vehicul\n\n");
  861.     strcat( string, "{7CFC00}/vlock - {FFFAF0}inchizi vehiculul\n");
  862.     strcat( string, "{7CFC00}/vpark - {FFFAF0}parchezi vehiculul \n");
  863.     strcat( string, "{7CFC00}/vvindelui - {FFFAF0}vinzi vehiculul cuiva \n");
  864.     strcat( string, "{7CFC00}/vvinde - {FFFAF0}vinzi vehiculul la dealer \n");
  865.     strcat( string, "{7CFC00}/vcumpara - {FFFAF0}cumperi vehiculul \n");
  866.     strcat( string, "{7CFC00}/vneon - {FFFAF0}aprinzi neon-ul \n");
  867.     strcat( string, "{7CFC00}/cumparaneon - {FFFAF0}cumperi neon\n");
  868.     strcat( string, "{7CFC00}/mycars - {FFFAF0}vezi vehiculele tale\n\n\n");
  869.     strcat( string, "{7CFC00}/asellcar - {FFFAF0}vinzi vehiculul (RCON)\n");
  870.     strcat( string, "{7CFC00}/acreatecar - {FFFAF0}creezi vehiculul (RCON)\n");
  871.     strcat( string, "{7CFC00}/apark - {FFFAF0}parchezi vehiculul (RCON)\n");
  872.     strcat( string, "{7CFC00}/asetpret - {FFFAF0}setezi pretul (RCON)\n\n\n");
  873.     strcat( string, "{FFFFFF}Sistemul de vehicule personale creeat de: {FFFAF0}Gireada");
  874.     ShowPlayerDialog(playerid, 8, DIALOG_STYLE_MSGBOX,"Comenzi",string,"Accept","");
  875.     return 1;
  876. }
  877.  
  878. CMD:motor(playerid, params[])
  879. {
  880.     new playerState = GetPlayerState(playerid), string[256], vehicleid = GetPlayerVehicleID(playerid), name1[MAX_PLAYERS];
  881.     new engine,lights,alarm,doors,bonnet,boot,objective;
  882.     GetPlayerName(playerid, name1, sizeof(name1));
  883.     GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective);
  884.     new name[MAX_PLAYER_NAME];
  885.     GetPlayerName(playerid, name, sizeof(name));
  886.     if(!(VehInfo[vehicleid][Propietar] == name[playerid]))
  887.     {
  888.         SendClientMessage(playerid, 0xFFFFFFFF, "Nu ai cheile acestui vehicul");
  889.     }
  890.     if(playerState == PLAYER_STATE_DRIVER)
  891.     {
  892.         if(motoron[vehicleid] == 0)
  893.         {
  894.             motoron[vehicleid] = 1;
  895.             SetVehicleParamsEx(vehicleid,true,lights,alarm,doors,bonnet,boot,objective);
  896.             format(string, sizeof(string), "* %s invarte cheia si porneste motorul.",name1);
  897.             ProxDetector(30.0, playerid, string, PURPLE,PURPLE,PURPLE,PURPLE,PURPLE);
  898.             return 1;
  899.         }
  900.         else if(motoron[vehicleid] == 1)
  901.         {
  902.             motoron[vehicleid] = 0;
  903.             SetVehicleParamsEx(vehicleid,false,lights,alarm,doors,bonnet,boot,objective);
  904.             format(string, sizeof(string), "* %s invarte cheia si opreste motorul.",name1);
  905.             ProxDetector(30.0, playerid, string, PURPLE,PURPLE,PURPLE,PURPLE,PURPLE);
  906.             return 1;
  907.         }
  908.     }
  909.     return 1;
  910. }
  911.  
  912. stock pName(playerid)
  913. {
  914.     new name[MAX_PLAYER_NAME];
  915.     GetPlayerName(playerid,name,sizeof(name));
  916.     return name;
  917. }
  918.  
  919. public OnPlayerConnect(playerid)
  920. {
  921.     new file[80];
  922.     format(file, sizeof(file),"JucatoriVehicule/%s.ini", pName(playerid));
  923.     if(dini_Exists(file))
  924.     {
  925.         PlayerInfo[playerid][pVehicule] = dini_Int(file,"Vehicule");
  926.         PlayerInfo[playerid][pLoggedIn] = dini_Int(file,"Logat");
  927.        
  928.     }
  929.     else if(!dini_Exists(file))
  930.     {
  931.         dini_Create(file);
  932.         dini_IntSet(file,"Vehicule",PlayerInfo[playerid][pVehicule] = 0);
  933.         dini_IntSet(file,"Logat",PlayerInfo[playerid][pVehicule] = 1);
  934.     }
  935.     carsshow[playerid] = 0;
  936.     return 1;
  937. }
  938.  
  939. public OnPlayerDisconnect(playerid, reason)
  940. {
  941.     new file[80];
  942.     format(file, sizeof(file),"JucatoriVehicule/%s.ini", pName(playerid));
  943.     dini_IntSet(file,"Vehicule",PlayerInfo[playerid][pVehicule]);
  944.     PlayerInfo[playerid][pLoggedIn] = 0;
  945.     return 1;
  946. }
  947.  
  948. public OnPlayerSpawn(playerid)
  949. {
  950.     PlayerInfo[playerid][pLoggedIn] = 1;
  951.     return 1;
  952. }
  953.  
  954. public OnPlayerDeath(playerid, killerid, reason)
  955. {
  956.     return 1;
  957. }
  958.  
  959. public OnVehicleSpawn(vehicleid)
  960. {
  961.     return 1;
  962. }
  963.  
  964. public OnVehicleDeath(vehicleid, killerid)
  965. {
  966.     DestroyObject(neon[vehicleid][0]);DestroyObject(neon[vehicleid][1]);DestroyObject(neon[vehicleid][2]);DestroyObject(neon[vehicleid][3]); neonon[vehicleid] = 0;
  967.     return 1;
  968. }
  969.  
  970. public OnPlayerText(playerid, text[])
  971. {
  972.     return 1;
  973. }
  974.  
  975. public OnPlayerCommandText(playerid, cmdtext[])
  976. {
  977.     if (strcmp("/mycommand", cmdtext, true, 10) == 0)
  978.     {
  979.         // Do something here
  980.         return 1;
  981.     }
  982.     return 0;
  983. }
  984.  
  985. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  986. {
  987.     new Float:x, Float:y, Float:z;
  988.     GetPlayerPos(playerid, x, y, z);
  989.     new name[MAX_PLAYER_NAME];
  990.     GetPlayerName(playerid, name, sizeof(name));
  991.     if(VehInfo[vehicleid][Inchisa] == 1 && VehInfo[vehicleid][Propietar] != name[playerid])
  992.     {
  993.         SetPlayerPos(playerid,x,y,z);
  994.         SendClientMessage(playerid, 0xFFFFFFFF, "Acest vehiculul este inchiat");
  995.     }
  996.     return 1;
  997. }
  998.  
  999. public OnPlayerExitVehicle(playerid, vehicleid)
  1000. {
  1001.     return 1;
  1002. }
  1003.  
  1004. public OnPlayerStateChange(playerid, newstate, oldstate)
  1005. {
  1006.     return 1;
  1007. }
  1008.  
  1009. public OnPlayerEnterCheckpoint(playerid)
  1010. {
  1011.     return 1;
  1012. }
  1013.  
  1014. public OnPlayerLeaveCheckpoint(playerid)
  1015. {
  1016.     return 1;
  1017. }
  1018.  
  1019. public OnPlayerEnterRaceCheckpoint(playerid)
  1020. {
  1021.     return 1;
  1022. }
  1023.  
  1024. public OnPlayerLeaveRaceCheckpoint(playerid)
  1025. {
  1026.     return 1;
  1027. }
  1028.  
  1029. public OnRconCommand(cmd[])
  1030. {
  1031.     return 1;
  1032. }
  1033.  
  1034. public OnPlayerRequestSpawn(playerid)
  1035. {
  1036.     return 1;
  1037. }
  1038.  
  1039. public OnObjectMoved(objectid)
  1040. {
  1041.     return 1;
  1042. }
  1043.  
  1044. public OnPlayerObjectMoved(playerid, objectid)
  1045. {
  1046.     return 1;
  1047. }
  1048.  
  1049. public OnPlayerPickUpPickup(playerid, pickupid)
  1050. {
  1051.     return 1;
  1052. }
  1053.  
  1054. public OnVehicleMod(playerid, vehicleid, componentid)
  1055. {
  1056.     if(GetPlayerInterior(playerid) == 0)
  1057.     {
  1058.         BanEx(playerid, "Tuning Hacks");
  1059.     }
  1060.     return 1;
  1061. }
  1062.  
  1063. public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
  1064. {
  1065.     if(GetPlayerInterior(playerid) == 0)
  1066.     {
  1067.         BanEx(playerid, "Tuning Hacks");
  1068.     }
  1069.     else if(GetPlayerInterior(playerid) == 1)
  1070.     {
  1071.         VehInfo[vehicleid][PaintJob] = paintjobid;
  1072.     }
  1073.     return 1;
  1074. }
  1075.  
  1076. public OnVehicleRespray(playerid, vehicleid, color1, color2)
  1077. {
  1078.     return 1;
  1079. }
  1080.  
  1081.  
  1082. public LoadCar()
  1083. {
  1084.     new file[254];
  1085.     new idx = buyablecars;
  1086.     new string2[256];
  1087.     while(idx<sizeof(VehInfo))
  1088.     {
  1089.         format(file, sizeof(file),"Vehicule/%d.ini", idx);
  1090.         if(dini_Exists(file))
  1091.         {
  1092.             VehInfo[idx][Model] = dini_Int(file,"Model");
  1093.             VehInfo[idx][Locatiex] = dini_Float(file,"Locatiex");
  1094.             VehInfo[idx][Locatiey] = dini_Float(file,"Locatiey");
  1095.             VehInfo[idx][Locatiez] = dini_Float(file,"Locatiez");
  1096.             VehInfo[idx][Rotatie] = dini_Float(file,"Rotatie");
  1097.             VehInfo[idx][Valoare] = dini_Int(file,"Valoare");
  1098.             VehInfo[idx][Culoare1] = dini_Int(file,"Culoare1");
  1099.             VehInfo[idx][Culoare2] = dini_Int(file,"Culoare2");
  1100.             strmid(VehInfo[idx][Propietar], dini_Get(file,"Propietar"), 0, strlen(dini_Get(file,"Propietar")), 255);
  1101.             VehInfo[idx][Cumparata] = dini_Int(file,"Cumparata");
  1102.             VehInfo[idx][Inchisa] = dini_Int(file,"Inchisa");
  1103.             VehInfo[idx][Neon] = dini_Int(file,"Neon");
  1104.             strmid(VehInfo[idx][Numar], dini_Get(file,"Numar"), 0, strlen(dini_Get(file,"Numar")), 255);
  1105.             VehInfo[idx][PaintJob] = dini_Int(file,"PaintJob");
  1106. //=============================================================[Spawner]===================================================================
  1107.             new carid = AddStaticVehicle(VehInfo[idx][Model], VehInfo[idx][Locatiex], VehInfo[idx][Locatiey], VehInfo[idx][Locatiez], VehInfo[idx][Rotatie], VehInfo[idx][Culoare1], VehInfo[idx][Culoare2]);
  1108.             SetVehicleNumberPlate(idx, VehInfo[idx][Numar]);
  1109.             ChangeVehiclePaintjob(idx, VehInfo[idx][PaintJob]);
  1110.             if(VehInfo[carid][Cumparata] == 1)
  1111.             {
  1112.                 format(string2, sizeof(string2), " Model: %s \n Propietar: %s",GetVehicleName(carid),VehInfo[idx][Propietar]);
  1113.                 vtextlabel[carid] = Create3DTextLabel(string2, 0xFF4500FF, VehInfo[carid][Locatiez], VehInfo[carid][Locatiey], VehInfo[carid][Locatiez], 20.0, 0, 0);
  1114.                 Attach3DTextLabelToVehicle(vtextlabel[carid] , carid, 0.0, 0.0, 0.0);
  1115.             }
  1116.             if(VehInfo[idx][Cumparata] == 0)
  1117.             {
  1118.                 format(string2, sizeof(string2), " DeVanzare\n Model: %s \n Pret: %d",GetVehicleName(carid), VehInfo[idx][Valoare]);
  1119.                 vtextlabel[carid] = Create3DTextLabel(string2, 0x7FFF00FF, VehInfo[carid][Locatiex], VehInfo[carid][Locatiey], VehInfo[carid][Locatiez], 20.0, 0, 0);
  1120.                 Attach3DTextLabelToVehicle(vtextlabel[carid] , carid, 0.0, 0.0, 0.0);
  1121.             }
  1122.             idx++;
  1123.         }
  1124.         else if(!dini_Exists(file))
  1125.         {
  1126.             idx++;
  1127.         }
  1128.     }
  1129.     printf("Server Stats: Vehicule Personale Incarcate");
  1130.     printf("S-au incarcat %d vehicule personale", idx-buyablecars);
  1131.     return 1;
  1132. }
  1133.  
  1134. public SaveCar()
  1135. {
  1136.     new file2[254];
  1137.     new idx = buyablecars;
  1138.     while(idx<sizeof(VehInfo))
  1139.     {
  1140.         format(file2, sizeof(file2),"Vehicule/%d.ini", idx);
  1141.         if(dini_Exists(file2))
  1142.         {
  1143.             dini_IntSet(file2,"Model",VehInfo[idx][Model]);
  1144.             dini_FloatSet(file2,"Locatiex",VehInfo[idx][Locatiex]);
  1145.             dini_FloatSet(file2,"Locatiey",VehInfo[idx][Locatiey]);
  1146.             dini_FloatSet(file2,"Locatiez",VehInfo[idx][Locatiez]);
  1147.             dini_FloatSet(file2,"Angle",VehInfo[idx][Rotatie]);
  1148.             dini_IntSet(file2,"Valoare",VehInfo[idx][Valoare]);
  1149.             dini_IntSet(file2,"Culoare1",VehInfo[idx][Culoare1]);
  1150.             dini_IntSet(file2,"Culoare2",VehInfo[idx][Culoare2]);
  1151.             dini_Set(file2,"Propietar",VehInfo[idx][Propietar]);
  1152.             dini_IntSet(file2,"Cumparata",VehInfo[idx][Cumparata]);
  1153.             dini_IntSet(file2,"Inchisa",VehInfo[idx][Inchisa]);
  1154.             dini_IntSet(file2,"Neon",VehInfo[idx][Neon]);
  1155.             dini_Set(file2,"Numar",VehInfo[idx][Numar]);
  1156.             SetVehicleNumberPlate(idx,VehInfo[idx][Numar]);
  1157.             dini_IntSet(file2,"PaintJob",VehInfo[idx][PaintJob]);
  1158.             idx++;
  1159.             return 1;
  1160.         }
  1161.         else if(!dini_Exists(file2))
  1162.         {
  1163.             dini_Create(file2);
  1164.             dini_IntSet(file2,"Model",VehInfo[idx][Model]);
  1165.             dini_FloatSet(file2,"Locatiex",VehInfo[idx][Locatiex]);
  1166.             dini_FloatSet(file2,"Locatiey",VehInfo[idx][Locatiey]);
  1167.             dini_FloatSet(file2,"Locatiez",VehInfo[idx][Locatiez]);
  1168.             dini_FloatSet(file2,"Angle",VehInfo[idx][Rotatie]);
  1169.             dini_IntSet(file2,"Valoare",VehInfo[idx][Valoare]);
  1170.             dini_IntSet(file2,"Culoare1",VehInfo[idx][Culoare1]);
  1171.             dini_IntSet(file2,"Culoare2",VehInfo[idx][Culoare2]);
  1172.             dini_Set(file2,"Propietar",VehInfo[idx][Propietar]);
  1173.             dini_IntSet(file2,"Cumparata",VehInfo[idx][Cumparata]);
  1174.             dini_IntSet(file2,"Inchisa",VehInfo[idx][Inchisa]);
  1175.             dini_IntSet(file2,"Neon",VehInfo[idx][Neon]);
  1176.             dini_Set(file2,"Numar",VehInfo[idx][Numar]);
  1177.             SetVehicleNumberPlate(idx,VehInfo[idx][Numar]);
  1178.             dini_IntSet(file2,"PaintJob",VehInfo[idx][PaintJob]);
  1179.             idx++;
  1180.             return 1;
  1181.         }
  1182.     }
  1183.     return 1;
  1184. }
  1185.  
  1186. public SaveThisCar(vehid)
  1187. {
  1188.     new file2[254];
  1189.     format(file2, sizeof(file2),"Vehicule/%d.ini", vehid);
  1190.     if(dini_Exists(file2))
  1191.     {
  1192.         dini_IntSet(file2,"Model",VehInfo[vehid][Model]);
  1193.         dini_FloatSet(file2,"Locatiex",VehInfo[vehid][Locatiex]);
  1194.         dini_FloatSet(file2,"Locatiey",VehInfo[vehid][Locatiey]);
  1195.         dini_FloatSet(file2,"Locatiez",VehInfo[vehid][Locatiez]);
  1196.         dini_FloatSet(file2,"Angle",VehInfo[vehid][Rotatie]);
  1197.         dini_IntSet(file2,"Valoare",VehInfo[vehid][Valoare]);
  1198.         dini_IntSet(file2,"Culoare1",VehInfo[vehid][Culoare1]);
  1199.         dini_IntSet(file2,"Culoare2",VehInfo[vehid][Culoare2]);
  1200.         dini_Set(file2,"Propietar",VehInfo[vehid][Propietar]);
  1201.         dini_IntSet(file2,"Cumparata",VehInfo[vehid][Cumparata]);
  1202.         dini_IntSet(file2,"Inchisa",VehInfo[vehid][Inchisa]);
  1203.         dini_IntSet(file2,"Neon",VehInfo[vehid][Neon]);
  1204.         dini_Set(file2,"Numar",VehInfo[vehid][Numar]);
  1205.         SetVehicleNumberPlate(vehid,VehInfo[vehid][Numar]);
  1206.         dini_IntSet(file2,"PaintJob",VehInfo[vehid][PaintJob]);
  1207.         return 1;
  1208.     }
  1209.     else if(!dini_Exists(file2))
  1210.     {
  1211.         dini_Create(file2);
  1212.         dini_IntSet(file2,"Model",VehInfo[vehid][Model]);
  1213.         dini_FloatSet(file2,"Locatiex",VehInfo[vehid][Locatiex]);
  1214.         dini_FloatSet(file2,"Locatiey",VehInfo[vehid][Locatiey]);
  1215.         dini_FloatSet(file2,"Locatiez",VehInfo[vehid][Locatiez]);
  1216.         dini_FloatSet(file2,"Angle",VehInfo[vehid][Rotatie]);
  1217.         dini_IntSet(file2,"Valoare",VehInfo[vehid][Valoare]);
  1218.         dini_IntSet(file2,"Culoare1",VehInfo[vehid][Culoare1]);
  1219.         dini_IntSet(file2,"Culoare2",VehInfo[vehid][Culoare2]);
  1220.         dini_Set(file2,"Propietar",VehInfo[vehid][Propietar]);
  1221.         dini_IntSet(file2,"Cumparata",VehInfo[vehid][Cumparata]);
  1222.         dini_IntSet(file2,"Inchisa",VehInfo[vehid][Inchisa]);
  1223.         dini_IntSet(file2,"Neon",VehInfo[vehid][Neon]);
  1224.         dini_Set(file2,"Numar",VehInfo[vehid][Numar]);
  1225.         SetVehicleNumberPlate(vehid,VehInfo[vehid][Numar]);
  1226.         dini_IntSet(file2,"PaintJob",VehInfo[vehid][PaintJob]);
  1227.         return 1;
  1228.     }
  1229.     return 1;
  1230. }
  1231.  
  1232. public SendAdminMesaj(color,const string[])
  1233. {
  1234.     for(new i = 0; i < MAX_PLAYERS; i++)
  1235.     {
  1236.         if(IsPlayerConnected(i))
  1237.         {
  1238.             if(IsPlayerAdmin(i))
  1239.             {
  1240.                 SendClientMessage(i, color, string);
  1241.                 printf("%s", string);
  1242.             }
  1243.         }
  1244.     }
  1245.     return 1;
  1246. }
  1247.  
  1248. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  1249. {
  1250.    
  1251.     return 1;
  1252. }
  1253.  
  1254. public ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5)
  1255. {
  1256.     if(IsPlayerConnected(playerid))
  1257.     {
  1258.         new Float:posx, Float:posy, Float:posz;
  1259.         new Float:oldposx, Float:oldposy, Float:oldposz;
  1260.         new Float:tempposx, Float:tempposy, Float:tempposz;
  1261.         GetPlayerPos(playerid, oldposx, oldposy, oldposz);
  1262.         for(new i = 0; i < MAX_PLAYERS; i++)
  1263.         {
  1264.             if(IsPlayerConnected(i) && (GetPlayerVirtualWorld(playerid) == GetPlayerVirtualWorld(i)))
  1265.             {
  1266.                 GetPlayerPos(i, posx, posy, posz);
  1267.                 tempposx = (oldposx -posx);
  1268.                 tempposy = (oldposy -posy);
  1269.                 tempposz = (oldposz -posz);
  1270.                 if (((tempposx < radi/16) && (tempposx > -radi/16)) && ((tempposy < radi/16) && (tempposy > -radi/16)) && ((tempposz < radi/16) && (tempposz > -radi/16))) // If the player is within 16 meters
  1271.                 {
  1272.                     SendClientMessage(i, col1, string);
  1273.                 }
  1274.                 else if (((tempposx < radi/8) && (tempposx > -radi/8)) && ((tempposy < radi/8) && (tempposy > -radi/8)) && ((tempposz < radi/8) && (tempposz > -radi/8))) // within 8 meters
  1275.                 {
  1276.                     SendClientMessage(i, col2, string);
  1277.                 }
  1278.                 else if (((tempposx < radi/4) && (tempposx > -radi/4)) && ((tempposy < radi/4) && (tempposy > -radi/4)) && ((tempposz < radi/4) && (tempposz > -radi/4))) //4 meters
  1279.                 {
  1280.                     SendClientMessage(i, col3, string);
  1281.                 }
  1282.                 else if (((tempposx < radi/2) && (tempposx > -radi/2)) && ((tempposy < radi/2) && (tempposy > -radi/2)) && ((tempposz < radi/2) && (tempposz > -radi/2))) //2 meters
  1283.                 {
  1284.                     SendClientMessage(i, col4, string);
  1285.                 }
  1286.                 else if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi))) //1 meter
  1287.                 {
  1288.                     SendClientMessage(i, col5, string);
  1289.                 }
  1290.             }
  1291.             else
  1292.             {
  1293.                 SendClientMessage(i, col1, string);
  1294.             }
  1295.         }
  1296.     }
  1297.     return 1;
  1298. }
  1299.  
  1300. stock GetDistanceToCar(playerid,carid)
  1301. {
  1302.     new Float:dis;
  1303.     new Float:x1,Float:y1,Float:z1,Float:x2,Float:y2,Float:z2;
  1304.     if (!IsPlayerConnected(playerid)) {
  1305.     return -1;
  1306.     }
  1307.     GetPlayerPos(playerid,x1,y1,z1);
  1308.     if(!IsVehicleInUse(carid)){
  1309.         GetVehiclePos(carid,x2,y2,z2);
  1310.         dis = floatsqroot(floatpower(floatabs(floatsub(x2,x1)),2)+floatpower(floatabs(floatsub(y2,y1)),2)+floatpower(floatabs(floatsub(z2,z1)),2));
  1311.         return floatround(dis);
  1312.     }else{
  1313.         return 1;
  1314.     }
  1315. }
  1316.  
  1317. stock IsVehicleInUse(vehicleid)
  1318. {
  1319.     for(new i; i != MAX_PLAYERS; i++)
  1320.     {
  1321.         if(GetPlayerVehicleID(i) == vehicleid)
  1322.         {
  1323.             return i;
  1324.         }
  1325.     }
  1326.     return INVALID_PLAYER_ID;
  1327. }
  1328.  
  1329. new VehicleNames[][] =
  1330. {
  1331.     "Landstalker", "Bravura", "Buffalo", "Linerunner", "Perrenial", "Sentinel",
  1332.     "Dumper", "Firetruck", "Trashmaster", "Stretch", "Manana", "Infernus",
  1333.     "Voodoo", "Pony", "Mule", "Cheetah", "Ambulance", "Leviathan", "Moonbeam",
  1334.     "Esperanto", "Taxi", "Washington", "Bobcat", "Whoopee", "BF Injection",
  1335.     "Hunter", "Premier", "Enforcer", "Securicar", "Banshee", "Predator", "Bus",
  1336.     "Rhino", "Barracks", "Hotknife", "Trailer", "Previon", "Coach", "Cabbie",
  1337.     "Stallion", "Rumpo", "RC Bandit", "Romero", "Packer", "Monster", "Admiral",
  1338.     "Squalo", "Seasparrow", "Pizzaboy", "Tram", "Trailer", "Turismo", "Speeder",
  1339.     "Reefer", "Tropic", "Flatbed", "Yankee", "Caddy", "Solair", "Berkley's RC Van",
  1340.     "Skimmer", "PCJ-600", "Faggio", "Freeway", "RC Baron", "RC Raider", "Glendale",
  1341.     "Oceanic","Sanchez", "Sparrow", "Patriot", "Quad", "Coastguard", "Dinghy",
  1342.     "Hermes", "Sabre", "Rustler", "ZR-350", "Walton", "Regina", "Comet", "BMX",
  1343.     "Burrito", "Camper", "Marquis", "Baggage", "Dozer", "Maverick", "News Chopper",
  1344.     "Rancher", "FBI Rancher", "Virgo", "Greenwood", "Jetmax", "Hotring", "Sandking",
  1345.     "Blista Compact", "Police Maverick", "Boxville", "Benson", "Mesa", "RC Goblin",
  1346.     "Hotring Racer A", "Hotring Racer B", "Bloodring Banger", "Rancher", "Super GT",
  1347.     "Elegant", "Journey", "Bike", "Mountain Bike", "Beagle", "Cropduster", "Stunt",
  1348.     "Tanker", "Roadtrain", "Nebula", "Majestic", "Buccaneer", "Shamal", "Hydra",
  1349.     "FCR-900", "NRG-500", "HPV1000", "Cement Truck", "Tow Truck", "Fortune",
  1350.     "Cadrona", "FBI Truck", "Willard", "Forklift", "Tractor", "Combine", "Feltzer",
  1351.     "Remington", "Slamvan", "Blade", "Freight", "Streak", "Vortex", "Vincent",
  1352.     "Bullet", "Clover", "Sadler", "Firetruck", "Hustler", "Intruder", "Primo",
  1353.     "Cargobob", "Tampa", "Sunrise", "Merit", "Utility", "Nevada", "Yosemite",
  1354.     "Windsor", "Monster", "Monster", "Uranus", "Jester", "Sultan", "Stratium",
  1355.     "Elegy", "Raindance", "RC Tiger", "Flash", "Tahoma", "Savanna", "Bandito",
  1356.     "Freight Flat", "Streak Carriage", "Kart", "Mower", "Dune", "Sweeper",
  1357.     "Broadway", "Tornado", "AT-400", "DFT-30", "Huntley", "Stafford", "BF-400",
  1358.     "News Van", "Tug", "Trailer", "Emperor", "Wayfarer", "Euros", "Hotdog", "Club",
  1359.     "Freight Box", "Trailer", "Andromada", "Dodo", "RC Cam", "Launch", "Police Car",
  1360.     "Police Car", "Police Car", "Police Ranger", "Picador", "S.W.A.T", "Alpha",
  1361.     "Phoenix", "Glendale", "Sadler", "Luggage", "Luggage", "Stairs", "Boxville",
  1362.     "Tiller", "Utility Trailer"
  1363. };
  1364.  
  1365. stock GetVehicleName(vehicleid)
  1366. {
  1367.     new String[256];
  1368.     format(String,sizeof(String),"%s",VehicleNames[GetVehicleModel(vehicleid) - 400]);
  1369.     return String;
  1370. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement