User
Pass
2FA
 
 

Bug samp

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Freakz Forum Index -> Trash Bin -> Trash -> Programming / Scripting / Database
Author Message2636
JJWeedDealer

[Mentally Stable]



Status: Offline
(since 22-08-2012 10:38)
Joined: 10 Jul 2012
Posts: 5, Topics: 2
Location: Romania

Reputation: 48.2
Votes: 2

Post Posted: 20-08-2012, 19:50:53 | Translate post to: ... (Click for more languages)

Salut ... am un server de samp care urmeaza sa il hostez si am un bug la masinile personale. Am sistemu carownership, nu l am modificat deloc, deci cand bag masini personale dupa restart spune ca sunt de la ng, scoala de soferi etc.Daca aveti vreo idee spunetimi cum sa rezolv.
0 0
  
Back to top
View user's profile Send private message
Delialol

[Mentally Stable]



Status: Offline
(since 28-06-2016 14:51)
Joined: 22 Apr 2012
Posts: 99, Topics: 23
Location: Romania

Reputation: 124.3
Votes: 8

 
Post Posted: 21-08-2012, 00:48:55 | Translate post to: ... (Click for more languages)

Ai putea sa incerci sa-ti bagi un plugin care sa faca asta.Sunt multe pe internet,sau posteaza aici intr-un attachment scriptul pe care il folosesti si te ajut eu



0 0
  
Back to top
View user's profile Send private message
JJWeedDealer

[Mentally Stable]



Status: Offline
(since 22-08-2012 10:38)
Joined: 10 Jul 2012
Posts: 5, Topics: 2
Location: Romania

Reputation: 48.2
Votes: 2

Post Posted: 21-08-2012, 08:26:37 | Translate post to: ... (Click for more languages)

Asta e

Code:

/*


---------------[CMD]----------------

/newbuycar [carid] [color1] [color2] [Price] you need to be a logged in as a rcon admin
/sellveh [Price] - you need to be logged in as a rcon admin, adn in a personal car - will make the vehicle for sale
/buyveh - to Buy the Specific Vehicle - you need to be in a buyable car
/removeveh - Delete Vehicle (You must sit in the Specific Vehicle) and you need to be logged in as a rcon admin
/v locate - use this command to find your car
/v lockmycar - lock your car
/v unlockmycar - unlock's your car
/v park - to park your car
*/
#include <a_samp>
#include <dini>
#define COLOR_GRAD2 0xBFC0C2FF
#define COLOR_GRAD3 0xCBCCCEFF
#define ORANGE 0xF67900F6
#define WHITE 0xF6F6F6F6
#define GREEN 0x00D400F6
#define YELLOW 0xECD400F6
#define COLOR_GREY 0x777979FF
#define COLOR_PURPLE 0xC2A2DAAA
#define COLOR_WHITE 0xFFFFFFAA
#define MAX_BUY_V 50
#pragma tabsize 0
forward ini_GetKey( line[] );

enum Auto
{
   model,owned,cLock,
   Float:x,Float:y,Float:z,
   Farbe1,Farbe2,Float:a,owner[128],preis,paintjob,mod1,mod2,mod3,mod4,mod5,mod6,mod7,mod8,mod9,mod10,
   mod11,mod12,mod13,mod14,mod15,mod16,mod17,
}
new VehicleSystem[MAX_BUY_V][Auto];
new IDIS[MAX_VEHICLES];
new created;
new file[256];
new Text3D:TextUpCar[MAX_VEHICLES];
new TextCar[256];
/* WICHTIG FUERS SAVEN */
forward ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5);
forward SaveTool();
forward Carlabel(playerid);
/* TUNING PARTS */
new spoiler[20][0] = {
   {1000},
   {1001},
   {1002},
   {1003},
   {1014},
   {1015},
   {1016},
   {1023},
   {1058},
   {1060},
   {1049},
   {1050},
   {1138},
   {1139},
   {1146},
   {1147},
   {1158},
   {1162},
   {1163},
   {1164}
};

new nitro[3][0] = {
    {1008},
    {1009},
    {1010}
};

new fbumper[23][0] = {
    {1117},
    {1152},
    {1153},
    {1155},
    {1157},
    {1160},
    {1165},
    {1167},
    {1169},
    {1170},
    {1171},
    {1172},
    {1173},
    {1174},
    {1175},
    {1179},
    {1181},
    {1182},
    {1185},
    {1188},
    {1189},
    {1192},
    {1193}
};

new rbumper[22][0] = {
    {1140},
    {1141},
    {1148},
    {1149},
    {1150},
    {1151},
    {1154},
    {1156},
    {1159},
    {1161},
    {1166},
    {1168},
    {1176},
    {1177},
    {1178},
    {1180},
    {1183},
    {1184},
    {1186},
    {1187},
    {1190},
    {1191}
};

new exhaust[28][0] = {
    {1018},
    {1019},
    {1020},
    {1021},
    {1022},
    {1028},
    {1029},
    {1037},
    {1043},
    {1044},
    {1045},
    {1046},
    {1059},
    {1064},
    {1065},
    {1066},
    {1089},
    {1092},
    {1104},
    {1105},
    {1113},
    {1114},
    {1126},
    {1127},
    {1129},
    {1132},
    {1135},
    {1136}
};

new bventr[2][0] = {
    {1042},
    {1044}
};

new bventl[2][0] = {
    {1043},
    {1045}
};

new bscoop[4][0] = {
   {1004},
   {1005},
   {1011},
   {1012}
};

new rscoop[13][0] = {
    {1006},
    {1032},
    {1033},
    {1035},
    {1038},
    {1053},
    {1054},
    {1055},
    {1061},
    {1067},
    {1068},
    {1088},
    {1091}
};

new lskirt[21][0] = {
    {1007},
    {1026},
    {1031},
    {1036},
    {1039},
    {1042},
    {1047},
    {1048},
    {1056},
    {1057},
    {1069},
    {1070},
    {1090},
    {1093},
    {1106},
    {1108},
    {1118},
    {1119},
    {1133},
    {1122},
    {1134}
};

new rskirt[21][0] = {
    {1017},
    {1027},
    {1030},
    {1040},
    {1041},
    {1051},
    {1052},
    {1062},
    {1063},
    {1071},
    {1072},
    {1094},
    {1095},
    {1099},
    {1101},
    {1102},
    {1107},
    {1120},
    {1121},
    {1124},
    {1137}
};

new hydraulics[1][0] = {
    {1087}
};

new base[1][0] = {
    {1086}
};

new rbbars[2][0] = {
    {1109},
    {1110}
};

new fbbars[2][0] = {
    {1115},
    {1116}
};

new wheels[17][0] = {
    {1025},
    {1073},
    {1074},
    {1075},
    {1076},
    {1077},
    {1078},
    {1079},
    {1080},
    {1081},
    {1082},
    {1083},
    {1084},
    {1085},
    {1096},
    {1097},
    {1098}
};

new lights[2][0] = {
   {1013},
   {1024}
};
forward Tunen(vehicleid);
/**/
#define FILTERSCRIPT

#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
   if(!dini_Exists("PersonalCars/cars.cfg")){
   dini_Create("PersonalCars/cars.cfg");}
   new loader[128];
   for(new i = 0;i<MAX_BUY_V;i++)
   {
   format(loader,sizeof(loader),"veh_model_%d",i);
   VehicleSystem[i][model] = dini_Int("PersonalCars/cars.cfg",loader);
   format(loader,sizeof(loader),"veh_owned_%d",i);
   VehicleSystem[i][owned] = dini_Int("PersonalCars/cars.cfg",loader);
   format(loader,sizeof(loader),"veh_cLock_%d",i);
   VehicleSystem[i][cLock] = dini_Int("PersonalCars/cars.cfg",loader);
   format(loader,sizeof(loader),"veh_owner_%d",i);
    strmid(VehicleSystem[i][owner],dini_Get("PersonalCars/cars.cfg",loader),0,128,128);
   format(loader,sizeof(loader),"veh_x_%d",i);
   VehicleSystem[i][x] = dini_Float("PersonalCars/cars.cfg",loader);
   format(loader,sizeof(loader),"veh_y_%d",i);
   VehicleSystem[i][y] = dini_Float("PersonalCars/cars.cfg",loader);
   format(loader,sizeof(loader),"veh_z_%d",i);
   VehicleSystem[i][z] = dini_Float("PersonalCars/cars.cfg",loader);
   format(loader,sizeof(loader),"veh_Farbe1_%d",i);
   VehicleSystem[i][Farbe1] = dini_Int("PersonalCars/cars.cfg",loader);
   format(loader,sizeof(loader),"veh_Farbe2_%d",i);
   VehicleSystem[i][Farbe2] = dini_Int("PersonalCars/cars.cfg",loader);
   format(loader,sizeof(loader),"veh_a_%d",i);
   VehicleSystem[i][a] = dini_Float("PersonalCars/cars.cfg",loader);
    format(loader,sizeof(loader),"veh_owner_%d",i);
    strmid(VehicleSystem[i][owner],dini_Get("PersonalCars/cars.cfg",loader),0,128,128);
   format(loader,sizeof(loader),"veh_preis_%d",i);
   VehicleSystem[i][preis] = dini_Int("PersonalCars/cars.cfg",loader);
   //
   format(loader,sizeof(loader),"veh_mod1_%d",i);
   VehicleSystem[i][mod1] = dini_Int("PersonalCars/cars.cfg",loader);
   format(loader,sizeof(loader),"veh_mod2_%d",i);
   VehicleSystem[i][mod2] = dini_Int("PersonalCars/cars.cfg",loader);
   format(loader,sizeof(loader),"veh_mod3_%d",i);
   VehicleSystem[i][mod3] = dini_Int("PersonalCars/cars.cfg",loader);
   format(loader,sizeof(loader),"veh_mod4_%d",i);
   VehicleSystem[i][mod4] = dini_Int("PersonalCars/cars.cfg",loader);
   format(loader,sizeof(loader),"veh_mod5_%d",i);
   VehicleSystem[i][mod5] = dini_Int("PersonalCars/cars.cfg",loader);
   format(loader,sizeof(loader),"veh_mod6_%d",i);
   VehicleSystem[i][mod6] = dini_Int("PersonalCars/cars.cfg",loader);
   format(loader,sizeof(loader),"veh_mod7_%d",i);
   VehicleSystem[i][mod7] = dini_Int("PersonalCars/cars.cfg",loader);
   format(loader,sizeof(loader),"veh_mod8_%d",i);
   VehicleSystem[i][mod8] = dini_Int("PersonalCars/cars.cfg",loader);
   format(loader,sizeof(loader),"veh_mod9_%d",i);
   VehicleSystem[i][mod9] = dini_Int("PersonalCars/cars.cfg",loader);
   format(loader,sizeof(loader),"veh_mod10_%d",i);
   VehicleSystem[i][mod10] = dini_Int("PersonalCars/cars.cfg",loader);
   format(loader,sizeof(loader),"veh_mod11_%d",i);
   VehicleSystem[i][mod11] = dini_Int("PersonalCars/cars.cfg",loader);
   format(loader,sizeof(loader),"veh_mod12_%d",i);
   VehicleSystem[i][mod12] = dini_Int("PersonalCars/cars.cfg",loader);
   format(loader,sizeof(loader),"veh_mod13_%d",i);
   VehicleSystem[i][mod13] = dini_Int("PersonalCars/cars.cfg",loader);
   format(loader,sizeof(loader),"veh_mod14_%d",i);
   VehicleSystem[i][mod14] = dini_Int("PersonalCars/cars.cfg",loader);
   format(loader,sizeof(loader),"veh_mod15_%d",i);
   VehicleSystem[i][mod15] = dini_Int("PersonalCars/cars.cfg",loader);
   format(loader,sizeof(loader),"veh_mod16_%d",i);
   VehicleSystem[i][mod16] = dini_Int("PersonalCars/cars.cfg",loader);
   format(loader,sizeof(loader),"veh_mod17_%d",i);
   VehicleSystem[i][mod17] = dini_Int("PersonalCars/cars.cfg",loader);
   //
   format(loader,sizeof(loader),"veh_paint_%d",i);
   VehicleSystem[i][paintjob] = dini_Int("PersonalCars/cars.cfg",loader);
   
   new car = CreateVehicle(VehicleSystem[i][model],VehicleSystem[i][x],VehicleSystem[i][y],VehicleSystem[i][z],VehicleSystem[i][a],VehicleSystem[i][Farbe1],VehicleSystem[i][Farbe2],600000);
   //
    if(VehicleSystem[i][model]!=0){
    created++;
    Tunen(car);
    IDIS[car] = created;
    }
   }
   for(new c = 0; c < MAX_VEHICLES; c++)
   {
   if (VehicleSystem[c][owned]==1)
   {
   format(TextCar,sizeof(TextCar),"{00FFEE}%s{FFFFFF}'s vehicle",VehicleSystem[GetCreatorID(c)][owner]);
    TextUpCar[c] = Create3DTextLabel(TextCar, 0xFFFFFFAA ,0,0,0,20.0,0);
   Attach3DTextLabelToVehicle(TextUpCar[c],c,0.0,0.0,0.0);
   SetVehicleNumberPlate(c, VehicleSystem[GetCreatorID(c)][owner]);
   }
   else if(VehicleSystem[c][owned]==0)
   {
   format(TextCar,sizeof(TextCar),"This vehicle is for sale, price: %d",VehicleSystem[GetCreatorID(c)][preis]);
    TextUpCar[c] = Create3DTextLabel(TextCar, 0xFFFFFFAA ,0,0,0,20.0,0);
   Attach3DTextLabelToVehicle(TextUpCar[c],c,0.0,0.0,0.0);
   }
   }
   return 1;
}

public OnFilterScriptExit()
{
   return 1;
}

#else

main()
{
}

#endif

public OnGameModeInit()
{
   return 1;
}

public OnGameModeExit()
{
   return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
   return 1;
}

public OnPlayerRequestSpawn(playerid)
{
   return 1;
}

public OnPlayerConnect(playerid)
{   if(!dini_Exists(PFile(playerid)))
   {
       dini_Create(PFile(playerid));
       dini_IntSet(PFile(playerid),"HaveCar",0);
   }
   return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
   return 1;
}

public OnPlayerSpawn(playerid)
{
    AntiDeAMX();
   return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
   return 1;
}

public OnVehicleSpawn(vehicleid)
{
   return 1;
}

public OnVehicleDeath(vehicleid, killerid)
{
   if(GetCreatorID(vehicleid)!=0)
   {
   new create = GetCreatorID(vehicleid);
   DestroyVehicle(vehicleid);
   new CAR = CreateVehicle(VehicleSystem[create][model],VehicleSystem[create][x],VehicleSystem[create][y],VehicleSystem[create][z],VehicleSystem[create][a],VehicleSystem[create][Farbe1],VehicleSystem[create][Farbe2],600000);
   SetVehicleNumberPlate(vehicleid, VehicleSystem[GetCreatorID(vehicleid)][owner]);
   Tunen(CAR);
   }
   return 1;
}

public OnPlayerText(playerid, text[])
{
   return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
   new cmd[128],tmp[128],idx;
   cmd = strtok(cmdtext,idx);
   new string[256];
   new vehicleid = GetPlayerVehicleID(playerid);
   new giveplayer[MAX_PLAYER_NAME];
   new sendername[MAX_PLAYER_NAME];
   new giveplayerid;
   if(strcmp(cmd, "/v", true) == 0)
   {
       if(IsPlayerConnected(playerid))
       {
           new x_nr[64];
           x_nr = strtok(cmdtext, idx);
           if(!strlen(x_nr))
           {
               SendClientMessage(playerid, COLOR_GREY, "HINT: (/v)ehicle [name]");
               SendClientMessage(playerid, COLOR_WHITE, "Available names: park, lockmycar, unlockmycar, locate");
               return 1;
           }
           if(strcmp(x_nr,"lockmycar",true) == 0)
          {
          new keycar = (dini_Int(PFile(playerid),"HaveCar"));
          new personalcar = (dini_Int(PFile(playerid),"CarID"));
          if(keycar == 1)
           {
            new locked[256];
             locked = strtok(cmdtext, idx);
           if (VehicleSystem[GetCreatorID(personalcar)][cLock]==1)
           {
             for(new i = 0; i < MAX_PLAYERS; i++)
         {
         if (IsPlayerConnected(i))
         {
         SetVehicleParamsForPlayer(personalcar,i,0,1);
         }
         }
         format(string, sizeof(string), "~w~Vehicle~n~~g~Locked");
         GameTextForPlayer(playerid, string, 4000, 3);
         VehicleSystem[GetCreatorID(personalcar)][cLock]=0;
         GetPlayerName(playerid, sendername, sizeof(sendername));
         format(string,sizeof(string), "* %s has locked his personal vehicle, using his car key!", sendername);
         ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
         SaveTool();
         return 1;
         }
         }
         }
         else if(strcmp(x_nr,"unlockmycar",true) == 0)
          {
           new keycar = (dini_Int(PFile(playerid),"HaveCar"));
           new personalcar = (dini_Int(PFile(playerid),"CarID"));
          if(keycar == 1)
           {
            new locked[256];
             locked = strtok(cmdtext, idx);
           if (VehicleSystem[GetCreatorID(vehicleid)][cLock]==0)
           {
             for(new i = 0; i < MAX_PLAYERS; i++)
         {
         if (IsPlayerConnected(i))
         {
         SetVehicleParamsForPlayer(personalcar,i,0,0);
         }
         }
         format(string, sizeof(string), "~w~Vehicle~n~~g~Unlocked");
         GameTextForPlayer(playerid, string, 4000, 3);
         GetPlayerName(playerid, sendername, sizeof(sendername));
         format(string,sizeof(string), "* %s has unlocked his personal vehicle, using his car key!", sendername);
         ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
         VehicleSystem[GetCreatorID(personalcar)][cLock]=1;
         SaveTool();
         return 1;
         }
         }
         }
         else if(strcmp(x_nr,"park",true) == 0)
         {
         if(!IsPlayerInAnyVehicle(playerid)){return 1;}
         if(GetCreatorID(vehicleid)!=0)
         {
         if (strmatch(VehicleSystem[GetCreatorID(vehicleid)][owner],Spielername(playerid)))
         {
         new Float:vx,Float:vy,Float:vz,Float:va;
         GetVehiclePos(GetPlayerVehicleID(playerid),vx,vy,vz);
         GetVehicleZAngle(GetPlayerVehicleID(playerid),va);
         VehicleSystem[GetCreatorID(vehicleid)][x]=vx;
         VehicleSystem[GetCreatorID(vehicleid)][y]=vy;
         VehicleSystem[GetCreatorID(vehicleid)][z]=vz;
         VehicleSystem[GetCreatorID(vehicleid)][a]=va;
         SetVehicleHealth(GetPlayerVehicleID(playerid),100.0);
         SendClientMessage(playerid,WHITE,"You have parked your vehicle here!");
         SendClientMessage(playerid,YELLOW,"Your vehicle will now respawn here!");
         SaveTool();
         }
         }
         return 1;
         }
            else if(strcmp(x_nr,"locate",true) == 0)
           {
              if(!IsPlayerConnected(playerid)) { return 1; }
             new Float:xxx,Float:yyy,Float:zzz;
                new keycar = (dini_Int(PFile(playerid),"HaveCar"));
              new personalcar = (dini_Int(PFile(playerid),"CarID"));
             if(keycar == 0) { GameTextForPlayer(playerid, "~w~You haven's got a car to find", 2500, 3); return 1; }
            SendClientMessage(playerid,COLOR_WHITE,"Your car has been found!");
            GetVehiclePos(personalcar, xxx, yyy, zzz);
             SetPlayerCheckpoint(playerid, xxx, yyy, zzz, 6);
             return 1;
           }
           }
           return 1;
       }

   if (strcmp(cmd, "/removeveh", true) ==0 )
   {
   if(!IsPlayerInAnyVehicle(playerid)){return 1;}
   if(!IsPlayerAdmin(playerid)){return 1;}
   VehicleSystem[GetCreatorID(vehicleid)][model]=0;
   VehicleSystem[GetCreatorID(vehicleid)][owned]=0;
   VehicleSystem[GetCreatorID(vehicleid)][x]=(0.0);
   VehicleSystem[GetCreatorID(vehicleid)][y]=(0.0);
   VehicleSystem[GetCreatorID(vehicleid)][z]=(0.0);
   VehicleSystem[GetCreatorID(vehicleid)][Farbe1]=0;
   VehicleSystem[GetCreatorID(vehicleid)][Farbe2]=0;
   VehicleSystem[GetCreatorID(vehicleid)][preis]=0;
   VehicleSystem[GetCreatorID(vehicleid)][mod1]=0;
   VehicleSystem[GetCreatorID(vehicleid)][mod2]=0;
   VehicleSystem[GetCreatorID(vehicleid)][mod3]=0;
   VehicleSystem[GetCreatorID(vehicleid)][mod4]=0;
   VehicleSystem[GetCreatorID(vehicleid)][mod5]=0;
   VehicleSystem[GetCreatorID(vehicleid)][mod6]=0;
   VehicleSystem[GetCreatorID(vehicleid)][mod7]=0;
   VehicleSystem[GetCreatorID(vehicleid)][mod8]=0;
   VehicleSystem[GetCreatorID(vehicleid)][mod9]=0;
   VehicleSystem[GetCreatorID(vehicleid)][mod10]=0;
   VehicleSystem[GetCreatorID(vehicleid)][mod11]=0;
   VehicleSystem[GetCreatorID(vehicleid)][mod12]=0;
   VehicleSystem[GetCreatorID(vehicleid)][mod13]=0;
   VehicleSystem[GetCreatorID(vehicleid)][mod14]=0;
   VehicleSystem[GetCreatorID(vehicleid)][mod15]=0;
   VehicleSystem[GetCreatorID(vehicleid)][mod16]=0;
   VehicleSystem[GetCreatorID(vehicleid)][mod17]=0;
   VehicleSystem[GetCreatorID(vehicleid)][paintjob]=0;
   VehicleSystem[GetCreatorID(vehicleid)][cLock]=1;
   strmid(VehicleSystem[GetCreatorID(vehicleid)][owner],"",0,128,128);
   IDIS[vehicleid]=0;
   DestroyVehicle(vehicleid);
   SaveTool();
   return 1;
   }
   if (strcmp(cmd, "/newbuycar", true) ==0 )
   {
   if(!IsPlayerAdmin(playerid)){return 1;}
   tmp = strtok(cmdtext,idx);
   if(!strlen(tmp)){return 1;}
   new vehiclemodel = strval(tmp);
   tmp = strtok(cmdtext,idx);
   if(!strlen(tmp)){return 1;}
   new color1 = strval(tmp);
   tmp = strtok(cmdtext,idx);
   if(!strlen(tmp)){return 1;}
   new color2 = strval(tmp);
   tmp = strtok(cmdtext,idx);
   if(!strlen(tmp)){return 1;}
   new price = strval(tmp);
   new Float:px,Float:py,Float:pz,Float:pa;
   GetPlayerPos(playerid,px,py,pz);
   GetPlayerFacingAngle(playerid,pa);
   created++;
   VehicleSystem[created][model]=vehiclemodel;
   VehicleSystem[created][x]=px;
   VehicleSystem[created][y]=py;
   VehicleSystem[created][z]=pz;
   VehicleSystem[created][a]=pa;
   VehicleSystem[created][Farbe1]=color1;
   VehicleSystem[created][Farbe2]=color2;
   VehicleSystem[created][preis]=price;
   VehicleSystem[created][owned]=0;
   VehicleSystem[created][cLock]=1;
   strmid(VehicleSystem[created][owner],"dealercar",0,128,128);
   new ccar = CreateVehicle(VehicleSystem[created][model],VehicleSystem[created][x],VehicleSystem[created][y],VehicleSystem[created][z],VehicleSystem[created][a],VehicleSystem[created][Farbe1],VehicleSystem[created][Farbe2],600000);
   IDIS[ccar]=created;
   SaveTool();
   return 1;
   }
   if (strcmp(cmd, "/buyveh", true) ==0 )
   {
   /*if(dini_Int(PFile(playerid),"HaveCar")== 1) return SendClientMessage(playerid,ORANGE,"[ERROR]You already have a Car");*/
   /*if(dini_Int(PFile(playerid),"HaveCar")== 1) { }
   else { SendClientMessage(playerid, ORANGE,"[ERROR]You already have a Car"); return 1; }*/
   new HaveCar = (dini_Int(PFile(playerid),"HaveCar"));
   if(!IsPlayerInAnyVehicle(playerid)){return 1;}
   if(GetCreatorID(vehicleid)!=0)
   {
   if(HaveCar == 0)
   {
   if (strmatch(VehicleSystem[GetCreatorID(vehicleid)][owner],Spielername(playerid))){SendClientMessage(playerid,WHITE," Aceasta masina este deja cumparata!");return 1;}
   if (strmatch(VehicleSystem[GetCreatorID(vehicleid)][owner],"dealercar"))
   {
   if(VehicleSystem[GetCreatorID(vehicleid)][preis] < GetPlayerMoney(playerid))
   {
   strmid(VehicleSystem[GetCreatorID(vehicleid)][owner],Spielername(playerid),0,128,128);
   VehicleSystem[GetCreatorID(vehicleid)][owned]=1;
   SetVehicleNumberPlate(vehicleid, VehicleSystem[GetCreatorID(vehicleid)][owner]);
   GivePlayerMoney(playerid,-VehicleSystem[GetCreatorID(vehicleid)][preis]);
   SendClientMessage(playerid,YELLOW," Congratulations with your new purchase!");
   SendClientMessage(playerid,WHITE," You can see your personal car commands by using /carhelp");
   TogglePlayerControllable(playerid,1);
   Delete3DTextLabel(TextUpCar[vehicleid]);
   SaveTool();
   }
   else
   {
   SendClientMessage(playerid,WHITE,"You don't have enough cash with you!");
   }
   }
   else
   {
   SendClientMessage(playerid,WHITE,"This car is not for sale!");
   }
   }
   else
   {
   SendClientMessage(playerid, ORANGE,"[ERROR]You already have a Car");
   }
   }
   else
   {
   SendClientMessage(playerid,WHITE,"It's not for sale!");
   }
   if(!dini_Exists(PFile(playerid)))
   {
       dini_Create(PFile(playerid));
       dini_IntSet(PFile(playerid),"HaveCar",1);
       dini_IntSet(PFile(playerid),"CarID",vehicleid);
   }
   else if(dini_Exists(PFile(playerid)))
   {
       dini_IntSet(PFile(playerid),"HaveCar",1);
       dini_IntSet(PFile(playerid),"CarID",vehicleid);
   }
   return 1;
   }
   
   if (strcmp(cmd, "/sellveh", true) ==0)
   {
   if(!IsPlayerInAnyVehicle(playerid)){return 1;}
   if(GetCreatorID(vehicleid)!=0)
   {
   if (IsPlayerAdmin(playerid))
   {
   tmp = strtok(cmdtext,idx);
   if(!strlen(tmp)){SendClientMessage(playerid,WHITE,"INFO: /sellveh [pret]");return 1;}
   new Float:vx,Float:vy,Float:vz,Float:va;
   GetVehiclePos(GetPlayerVehicleID(playerid),vx,vy,vz);
   GetVehicleZAngle(GetPlayerVehicleID(playerid),va);
   VehicleSystem[GetCreatorID(vehicleid)][x]=vx;
   VehicleSystem[GetCreatorID(vehicleid)][y]=vy;
   VehicleSystem[GetCreatorID(vehicleid)][z]=vz;
   VehicleSystem[GetCreatorID(vehicleid)][a]=va;
   VehicleSystem[GetCreatorID(vehicleid)][preis]=strval(tmp);
   VehicleSystem[GetCreatorID(vehicleid)][owned]=0;
   VehicleSystem[GetCreatorID(vehicleid)][cLock]=1;
   strmid(VehicleSystem[GetCreatorID(vehicleid)][owner],"dealercar",0,128,128);
   SendClientMessage(playerid,WHITE,"Aceasta masina e acum de vanzare!");
   SaveTool();
   Delete3DTextLabel(TextUpCar[vehicleid]);
   format(TextCar,sizeof(TextCar),"This car is for sale, price: %d",VehicleSystem[GetCreatorID(vehicleid)][preis]);
    TextUpCar[vehicleid] = Create3DTextLabel(TextCar, 0xFFFFFFAA ,0,0,0,20.0,0);
   Attach3DTextLabelToVehicle(TextUpCar[vehicleid],vehicleid,0.0,0.0,0.0);
   }
   else
   {
   SendClientMessage(playerid,WHITE,"INFO: Nu esti admin ca sa poti vinde masini!");
   }
   }
   return 1;
   }
   if (strcmp(cmd, "/apark", true) ==0 )
   {
   if(!IsPlayerInAnyVehicle(playerid)){return 1;}
   if(!IsPlayerAdmin(playerid)){return 1;}
   if(GetCreatorID(vehicleid)!=0)
   {
   new Float:vx,Float:vy,Float:vz,Float:va;
   GetVehiclePos(GetPlayerVehicleID(playerid),vx,vy,vz);
   GetVehicleZAngle(GetPlayerVehicleID(playerid),va);
   VehicleSystem[GetCreatorID(vehicleid)][x]=vx;
   VehicleSystem[GetCreatorID(vehicleid)][y]=vy;
   VehicleSystem[GetCreatorID(vehicleid)][z]=vz;
   VehicleSystem[GetCreatorID(vehicleid)][a]=va;
   SendClientMessage(playerid,WHITE,"Admin Park!");
   SaveTool();
   }
   else
   {
   SendClientMessage(playerid,WHITE," Nu poti parca aceasta masina!");
   }
   return 1;
   }
   if (strcmp(cmd, "/exitcar", true) ==0 )
   {
   if(!IsPlayerInAnyVehicle(playerid)){return 1;}
   if(GetCreatorID(vehicleid)!=0)
   {
   TogglePlayerControllable(playerid, 1);
   RemovePlayerFromVehicle(playerid);
   }
   return 1;
   }
   if(strcmp(cmd, "/carhelp", true) == 0)
   {
       SendClientMessage(playerid, 0x33AA33AA, "_______________________________________");
      SendClientMessage(playerid, 0xFFFFFFAA, "*** HELP *** Your Vehicle Commands");
      SendClientMessage(playerid, 0xCBCCCEFF, "*** CAR *** type /v to view your personal car commands!");
      return 1;
   }
   if (strcmp(cmd, "/deleteowner", true)==0)
   {
      if ((IsPlayerAdmin(playerid)))
      {
         tmp = strtok(cmdtext, idx);
         if(!strlen(tmp))
         {
            SendClientMessage(playerid, WHITE, "USAGE: /deleteowner [PlayerName]");
            return 1;
         }
            GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
         GetPlayerName(playerid, sendername, sizeof(sendername));

         format(string,sizeof(string),"Users/%s.ini",tmp);
         dini_Remove(string);
         SendClientMessage(playerid, ORANGE, "Owner Masina Sters");
      }
      return 1;
   }
   return 0;
}
stock Spielername(playerid)
{
new spname[128];
GetPlayerName(playerid,spname,sizeof(spname));
return spname;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    new personalcar = (dini_Int(PFile(playerid),"CarID"));
    for(new i=0; i < MAX_PLAYERS; i++)
    {
   if(GetCreatorID(vehicleid)!=0)
   {
    if (personalcar == vehicleid)
    {
    SetVehicleParamsForPlayer(vehicleid,i,0,0);
    }
    else
    {
   if (VehicleSystem[vehicleid][cLock]==0)
   {
   SetVehicleParamsForPlayer(vehicleid,i,0,1);
   }
   else if (VehicleSystem[vehicleid][cLock]==1)
   {
   SetVehicleParamsForPlayer(vehicleid,i,0,0);
   }
   }
   }
   }
   return 1;
}

public OnPlayerExitVehicle(playerid, vehicleid)
{   for(new c = 0; c < MAX_VEHICLES; c++)
   {
   if(GetCreatorID(vehicleid)!=0)
   {
    if (VehicleSystem[c][owned]==1)
   {
   format(TextCar,sizeof(TextCar),"{00FFEE}%s{FFFFFF}'s vehicle",VehicleSystem[GetCreatorID(vehicleid)][owner]);
    TextUpCar[vehicleid] = Create3DTextLabel(TextCar, 0xFFFFFFAA ,0,0,0,20.0,0);
   Attach3DTextLabelToVehicle(TextUpCar[vehicleid],vehicleid,0.0,0.0,0.0);
   SetVehicleNumberPlate(vehicleid, VehicleSystem[GetCreatorID(vehicleid)][owner]);
   }
   else if (VehicleSystem[c][owned]==0)
   {
   format(TextCar,sizeof(TextCar),"This vehicle is for sale, price: %d",VehicleSystem[GetCreatorID(c)][preis]);
    TextUpCar[c] = Create3DTextLabel(TextCar, 0xFFFFFFAA ,0,0,0,20.0,0);
   Attach3DTextLabelToVehicle(TextUpCar[c],c,0.0,0.0,0.0);
   SetVehicleNumberPlate(vehicleid, VehicleSystem[GetCreatorID(vehicleid)][owner]);
   }
   }
   }
   return 1;
}
public OnPlayerStateChange(playerid, newstate, oldstate)
{
   if(newstate == 2)
   {
   new vehicleid = GetPlayerVehicleID(playerid);
   if(GetCreatorID(vehicleid)!=0)
   {
   Tunen(vehicleid);
    if ((strmatch(VehicleSystem[GetCreatorID(vehicleid)][owner],Spielername(playerid))))
    {
      SendClientMessage(playerid,GREEN," Bine ai revenit in masina ta. Pentru a vedea comenzile tasteaza '/carhelp'.");
      for(new c = 0; c < MAX_VEHICLES; c++)
   {
   Delete3DTextLabel(TextUpCar[c]);
    }
    }
    else if(strmatch(VehicleSystem[GetCreatorID(vehicleid)][owner],"dealercar"))
    {
    if(!IsPlayerAdmin(playerid)){
    TogglePlayerControllable(playerid,0);}
    new fffx[128];
    format(fffx,sizeof(fffx),"Aceasta masina este de vanzare. Pretul %d$",VehicleSystem[GetCreatorID(vehicleid)][preis]);
    SendClientMessage(playerid,WHITE,fffx);
    SendClientMessage(playerid,YELLOW,"INFO: Use /buyveh to Buy it or you exited the car use '/exitcar'.");
    }
    else
    {
    TogglePlayerControllable(playerid,0);
    TogglePlayerControllable(playerid,1);
    new ex[128];
    RemovePlayerFromVehicle(playerid);
    format(ex,sizeof(ex),"Aceasta este masina lui %s.Nu ai voie in acest vehicul. ",VehicleSystem[GetCreatorID(vehicleid)][owner]);
    SendClientMessage(playerid,YELLOW,ex);
      for(new c = 0; c < MAX_VEHICLES; c++)
   {
    Delete3DTextLabel(TextUpCar[c]);
    }
    }
    }
    }
   return 1;
}

public ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5)
{
   if(IsPlayerConnected(playerid))
   {
      new Float:posx, Float:posy, Float:posz;
      new Float:oldposx, Float:oldposy, Float:oldposz;
      new Float:tempposx, Float:tempposy, Float:tempposz;
      GetPlayerPos(playerid, oldposx, oldposy, oldposz);
      //radi = 2.0; //Trigger Radius
      for(new i = 0; i < MAX_PLAYERS; i++)
      {
         if(IsPlayerConnected(i))
         {

               GetPlayerPos(i, posx, posy, posz);
               tempposx = (oldposx -posx);
               tempposy = (oldposy -posy);
               tempposz = (oldposz -posz);
               //printf("DEBUG: X:%f Y:%f Z:%f",posx,posy,posz);
               if (((tempposx < radi/16) && (tempposx > -radi/16)) && ((tempposy < radi/16) && (tempposy > -radi/16)) && ((tempposz < radi/16) && (tempposz > -radi/16)))
               {
                  SendClientMessage(i, col1, string);
               }
               else if (((tempposx < radi/8) && (tempposx > -radi/8)) && ((tempposy < radi/8) && (tempposy > -radi/8)) && ((tempposz < radi/8) && (tempposz > -radi/8)))
               {
                  SendClientMessage(i, col2, string);
               }
               else if (((tempposx < radi/4) && (tempposx > -radi/4)) && ((tempposy < radi/4) && (tempposy > -radi/4)) && ((tempposz < radi/4) && (tempposz > -radi/4)))
               {
                  SendClientMessage(i, col3, string);
               }
               else if (((tempposx < radi/2) && (tempposx > -radi/2)) && ((tempposy < radi/2) && (tempposy > -radi/2)) && ((tempposz < radi/2) && (tempposz > -radi/2)))
               {
                  SendClientMessage(i, col4, string);
               }
               else if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
               {
                  SendClientMessage(i, col5, string);
               }
            }
            else
            {
               SendClientMessage(i, col1, string);
            }
         }
   }//not connected
   return 1;
}

public OnPlayerEnterCheckpoint(playerid)
{
   return 1;
}

public OnPlayerLeaveCheckpoint(playerid)
{
   return 1;
}

public OnPlayerEnterRaceCheckpoint(playerid)
{
   return 1;
}

public OnPlayerLeaveRaceCheckpoint(playerid)
{
   return 1;
}

public OnRconCommand(cmd[])
{
   return 1;
}

public OnObjectMoved(objectid)
{
   return 1;
}

public OnPlayerObjectMoved(playerid, objectid)
{
   return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
   return 1;
}

public OnPlayerSelectedMenuRow(playerid, row)
{
   return 1;
}

public OnPlayerExitedMenu(playerid)
{
   return 1;
}
stock GetCreatorID(vehicleid)
{
return IDIS[vehicleid];
}
stock strmatch(const String1[], const String2[])
{
   if ((strcmp(String1, String2, true, strlen(String2)) == 0) && (strlen(String2) == strlen(String1)))
   {
   return true;
   }
   else
   {
   return false;
   }
}
/* TUNING */
InitComponents(componentid)
{
   new i;
   for(i=0; i<20; i++)
   {
       if(spoiler[i][0]==componentid) { return 1; }
   }
   for(i=0; i<3; i++)
   {
       if(nitro[i][0]==componentid) { return 2; }
   }
   for(i=0; i<23; i++)
   {
       if(fbumper[i][0]==componentid) { return 3; }
   }
   for(i=0; i<22; i++)
   {
       if(rbumper[i][0]==componentid) { return 4; }
   }
   for(i=0; i<28; i++)
   {
       if(exhaust[i][0]==componentid) { return 5; }
   }
   for(i=0; i<2; i++)
   {
       if(bventr[i][0]==componentid) { return 6; }
   }
   for(i=0; i<2; i++)
   {
       if(bventl[i][0]==componentid) { return 7; }
   }
   for(i=0; i<4; i++)
   {
       if(bscoop[i][0]==componentid) { return 8; }
   }
   for(i=0; i<13; i++)
   {
       if(rscoop[i][0]==componentid) { return 9; }
   }
   for(i=0; i<21; i++)
   {
       if(lskirt[i][0]==componentid) { return 10; }
   }
   for(i=0; i<21; i++)
   {
       if(rskirt[i][0]==componentid) { return 11; }
   }
   if(hydraulics[0][0]==componentid) { return 12; }
   if(base[0][0]==componentid) { return 13; }
   for(i=0; i<2; i++)
   {
       if(rbbars[i][0]==componentid) { return 14; }
   }
   for(i=0; i<2; i++)
   {
       if(fbbars[i][0]==componentid) { return 15; }
   }
   for(i=0; i<17; i++)
   {
       if(wheels[i][0]==componentid) { return 16; }
   }
   for(i=0; i<2; i++)
   {
       if(lights[i][0]==componentid) { return 17; }
   }
   return 0;
}
public OnVehiclePaintjob(playerid,vehicleid, paintjobid)
{
if(GetCreatorID(vehicleid)!=0)
{
VehicleSystem[GetCreatorID(vehicleid)][paintjob] =paintjobid;
}
return 1;
}
public OnVehicleRespray(playerid,vehicleid, color1, color2)
{
if(GetCreatorID(vehicleid)!=0)
{
VehicleSystem[GetCreatorID(vehicleid)][Farbe1] =color1;
VehicleSystem[GetCreatorID(vehicleid)][Farbe2] =color2;
}
return 1;
}
public OnVehicleMod(playerid,vehicleid,componentid)
{
if(GetCreatorID(vehicleid)!=0)
{
new Varz=InitComponents(componentid);
switch (Varz)
{
case 1: { VehicleSystem[GetCreatorID(vehicleid)][mod1] = componentid;}
case 2: { VehicleSystem[GetCreatorID(vehicleid)][mod2] = componentid; }
case 3: { VehicleSystem[GetCreatorID(vehicleid)][mod3] = componentid; }
case 4: { VehicleSystem[GetCreatorID(vehicleid)][mod4] = componentid; }
case 5: { VehicleSystem[GetCreatorID(vehicleid)][mod5] = componentid; }
case 6: { VehicleSystem[GetCreatorID(vehicleid)][mod6] = componentid; }
case 7: { VehicleSystem[GetCreatorID(vehicleid)][mod7] = componentid; }
case 8: { VehicleSystem[GetCreatorID(vehicleid)][mod8] = componentid;}
case 9: { VehicleSystem[GetCreatorID(vehicleid)][mod9] = componentid; }
case 10: { VehicleSystem[GetCreatorID(vehicleid)][mod10] = componentid; }
case 11: { VehicleSystem[GetCreatorID(vehicleid)][mod11] = componentid; }
case 12: { VehicleSystem[GetCreatorID(vehicleid)][mod12] = componentid; }
case 13: { VehicleSystem[GetCreatorID(vehicleid)][mod13] = componentid; }
case 14: { VehicleSystem[GetCreatorID(vehicleid)][mod14] = componentid; }
case 15: { VehicleSystem[GetCreatorID(vehicleid)][mod15] = componentid; }
case 16: { VehicleSystem[GetCreatorID(vehicleid)][mod16] = componentid; }
case 17: { VehicleSystem[GetCreatorID(vehicleid)][mod17] = componentid; }
}
}
printf("componentid Added: %d",componentid);
return 1;
}
public Tunen(vehicleid)
{
if(GetCreatorID(vehicleid)!=0)
{
        new tempmod;
        tempmod = VehicleSystem[GetCreatorID(vehicleid)][mod1];
      if(tempmod!=0) { AddVehicleComponent(vehicleid,tempmod); }
      tempmod = VehicleSystem[GetCreatorID(vehicleid)][mod2];
      if(tempmod!=0) { AddVehicleComponent(vehicleid,tempmod); }
      tempmod = VehicleSystem[GetCreatorID(vehicleid)][mod3];
      if(tempmod!=0) { AddVehicleComponent(vehicleid,tempmod); }
      tempmod = VehicleSystem[GetCreatorID(vehicleid)][mod4];
      if(tempmod!=0) { AddVehicleComponent(vehicleid,tempmod); }
      tempmod = VehicleSystem[GetCreatorID(vehicleid)][mod5];
      if(tempmod!=0) { AddVehicleComponent(vehicleid,tempmod); }
      tempmod = VehicleSystem[GetCreatorID(vehicleid)][mod6];
      if(tempmod!=0) { AddVehicleComponent(vehicleid,tempmod); }
      tempmod = VehicleSystem[GetCreatorID(vehicleid)][mod7];
      if(tempmod!=0) { AddVehicleComponent(vehicleid,tempmod); }
      tempmod = VehicleSystem[GetCreatorID(vehicleid)][mod8];
      if(tempmod!=0) { AddVehicleComponent(vehicleid,tempmod); }
      tempmod = VehicleSystem[GetCreatorID(vehicleid)][mod9];
      if(tempmod!=0) { AddVehicleComponent(vehicleid,tempmod); }
      tempmod = VehicleSystem[GetCreatorID(vehicleid)][mod10];
      if(tempmod!=0) { AddVehicleComponent(vehicleid,tempmod); }
      tempmod = VehicleSystem[GetCreatorID(vehicleid)][mod11];
      if(tempmod!=0) { AddVehicleComponent(vehicleid,tempmod); }
      tempmod = VehicleSystem[GetCreatorID(vehicleid)][mod12];
      if(tempmod!=0) { AddVehicleComponent(vehicleid,tempmod); }
      tempmod = VehicleSystem[GetCreatorID(vehicleid)][mod13];
      if(tempmod!=0) { AddVehicleComponent(vehicleid,tempmod); }
      tempmod = VehicleSystem[GetCreatorID(vehicleid)][mod14];
      if(tempmod!=0) { AddVehicleComponent(vehicleid,tempmod); }
      tempmod = VehicleSystem[GetCreatorID(vehicleid)][mod15];
      if(tempmod!=0) { AddVehicleComponent(vehicleid,tempmod); }
      tempmod = VehicleSystem[GetCreatorID(vehicleid)][mod16];
      if(tempmod!=0) { AddVehicleComponent(vehicleid,tempmod); }
      tempmod = VehicleSystem[GetCreatorID(vehicleid)][mod17];
      if(tempmod!=0) { AddVehicleComponent(vehicleid,tempmod); }
      tempmod = VehicleSystem[GetCreatorID(vehicleid)][paintjob];
      if(tempmod!=0) { ChangeVehiclePaintjob(vehicleid,tempmod); }
}
return 1;
}
//STRTOK

strtok(const string[], &index)
{
   new length = strlen(string);
   while ((index < length) && (string[index] <= ' '))
   {
      index++;
   }

   new offset = index;
   new result[20];
   while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
   {
      result[index - offset] = string[index];
      index++;
   }
   result[index - offset] = EOS;
   return result;
}

public SaveTool()
{
   new count;
   new saver[128];
   fremove("PersonalCars/cars.cfg");
   dini_Create("PersonalCars/cars.cfg");
   for(new i = 0;i<MAX_BUY_V;i++)
   {
   if(VehicleSystem[i][model]!=0)
   {
   count++;
    format(saver,sizeof(saver),"veh_model_%d",count);
    dini_IntSet("PersonalCars/cars.cfg",saver,VehicleSystem[i][model]);
    format(saver,sizeof(saver),"veh_owned_%d",count);
    dini_IntSet("PersonalCars/cars.cfg",saver,VehicleSystem[i][owned]);
    format(saver,sizeof(saver),"veh_cLock_%d",count);
    dini_IntSet("PersonalCars/cars.cfg",saver,VehicleSystem[i][cLock]);
    format(saver,sizeof(saver),"veh_x_%d",count);
    dini_FloatSet("PersonalCars/cars.cfg",saver,VehicleSystem[i][x]);
    format(saver,sizeof(saver),"veh_y_%d",count);
    dini_FloatSet("PersonalCars/cars.cfg",saver,VehicleSystem[i][y]);
    format(saver,sizeof(saver),"veh_z_%d",count);
    dini_FloatSet("PersonalCars/cars.cfg",saver,VehicleSystem[i][z]);
    format(saver,sizeof(saver),"veh_a_%d",count);
    dini_FloatSet("PersonalCars/cars.cfg",saver,VehicleSystem[i][a]);
    format(saver,sizeof(saver),"veh_Farbe1_%d",count);
    dini_IntSet("PersonalCars/cars.cfg",saver,VehicleSystem[i][Farbe1]);
    format(saver,sizeof(saver),"veh_Farbe2_%d",count);
    dini_IntSet("PersonalCars/cars.cfg",saver,VehicleSystem[i][Farbe2]);
    format(saver,sizeof(saver),"veh_owner_%d",count);
    dini_Set("PersonalCars/cars.cfg",saver,VehicleSystem[i][owner]);
    format(saver,sizeof(saver),"veh_preis_%d",count);
    dini_IntSet("PersonalCars/cars.cfg",saver,VehicleSystem[i][preis]);
    //
   format(saver,sizeof(saver),"veh_mod1_%d",count);
   dini_IntSet("PersonalCars/cars.cfg",saver,VehicleSystem[i][mod1]);
   format(saver,sizeof(saver),"veh_mod2_%d",count);
   dini_IntSet("PersonalCars/cars.cfg",saver,VehicleSystem[i][mod2]);
   format(saver,sizeof(saver),"veh_mod3_%d",count);
   dini_IntSet("PersonalCars/cars.cfg",saver,VehicleSystem[i][mod3]);
   format(saver,sizeof(saver),"veh_mod4_%d",count);
   dini_IntSet("PersonalCars/cars.cfg",saver,VehicleSystem[i][mod4]);
   format(saver,sizeof(saver),"veh_mod5_%d",count);
   dini_IntSet("PersonalCars/cars.cfg",saver,VehicleSystem[i][mod5]);
   format(saver,sizeof(saver),"veh_mod6_%d",count);
   dini_IntSet("PersonalCars/cars.cfg",saver,VehicleSystem[i][mod6]);
   format(saver,sizeof(saver),"veh_mod7_%d",count);
   dini_IntSet("PersonalCars/cars.cfg",saver,VehicleSystem[i][mod7]);
   format(saver,sizeof(saver),"veh_mod8_%d",count);
   dini_IntSet("PersonalCars/cars.cfg",saver,VehicleSystem[i][mod8]);
   format(saver,sizeof(saver),"veh_mod9_%d",count);
   dini_IntSet("PersonalCars/cars.cfg",saver,VehicleSystem[i][mod9]);
   format(saver,sizeof(saver),"veh_mod10_%d",count);
   dini_IntSet("PersonalCars/cars.cfg",saver,VehicleSystem[i][mod10]);
   format(saver,sizeof(saver),"veh_mod11_%d",count);
   dini_IntSet("PersonalCars/cars.cfg",saver,VehicleSystem[i][mod11]);
   format(saver,sizeof(saver),"veh_mod12_%d",count);
   dini_IntSet("PersonalCars/cars.cfg",saver,VehicleSystem[i][mod12]);
   format(saver,sizeof(saver),"veh_mod13_%d",count);
   dini_IntSet("PersonalCars/cars.cfg",saver,VehicleSystem[i][mod13]);
   format(saver,sizeof(saver),"veh_mod14_%d",count);
   dini_IntSet("PersonalCars/cars.cfg",saver,VehicleSystem[i][mod14]);
   format(saver,sizeof(saver),"veh_mod15_%d",count);
   dini_IntSet("PersonalCars/cars.cfg",saver,VehicleSystem[i][mod15]);
   format(saver,sizeof(saver),"veh_mod16_%d",count);
   dini_IntSet("PersonalCars/cars.cfg",saver,VehicleSystem[i][mod16]);
   format(saver,sizeof(saver),"veh_mod17_%d",count);
   dini_IntSet("PersonalCars/cars.cfg",saver,VehicleSystem[i][mod17]);
   //
   format(saver,sizeof(saver),"veh_paint_%d",count);
   dini_IntSet("PersonalCars/cars.cfg",saver,VehicleSystem[i][paintjob]);
   }
   }
   return 1;
}

stock Gn(playerid)
{
   new pname[24];
   GetPlayerName(playerid,pname,MAX_PLAYER_NAME);
   return pname;
}

stock PFile(playerid)
{
   format(file,64,"PersonalCars/Users/%s.ini",Gn(playerid));
   return file;
}

stock Pc(playerid) return dini_Int(PFile(playerid),"CarId");

public Carlabel(playerid)
{
   new carid = GetPlayerVehicleID(playerid);
   if (VehicleSystem[carid][owned]==1)
   {
   Delete3DTextLabel(TextUpCar[carid]);
   format(TextCar,sizeof(TextCar),"{00FFEE}%s{FFFFFF}'s vehicle",VehicleSystem[GetCreatorID(carid)][owner]);
    TextUpCar[carid] = Create3DTextLabel(TextCar, 0xFFFFFFAA ,0,0,0,20.0,0);
   Attach3DTextLabelToVehicle(TextUpCar[carid],carid,0.0,0.0,0.0);
   }
   else if(VehicleSystem[carid][owned]==0)
   {
   Delete3DTextLabel(TextUpCar[carid]);
   format(TextCar,sizeof(TextCar),"This car is for sale, price: %d",VehicleSystem[GetCreatorID(carid)][preis]);
    TextUpCar[carid] = Create3DTextLabel(TextCar, 0xFFFFFFAA ,0,0,0,20.0,0);
   Attach3DTextLabelToVehicle(TextUpCar[carid],carid,0.0,0.0,0.0);
   }
   return 1;
}

stock ini_GetKey( line[] )
{
   new keyRes[256];
   keyRes[0] = 0;
    if ( strfind( line , "=" , true ) == -1 ) return keyRes;
    strmid( keyRes , line , 0 , strfind( line , "=" , true ) , sizeof( keyRes) );
    return keyRes;
}

stock ini_GetValue( line[] )
{
   new valRes[256];
   valRes[0]=0;
   if ( strfind( line , "=" , true ) == -1 ) return valRes;
   strmid( valRes , line , strfind( line , "=" , true )+1 , strlen( line ) , sizeof( valRes ) );
   return valRes;
}

AntiDeAMX()
{
        new antideamx[][] =
        {
                "Unarmed (Fist)",
                "Brass K"
        };
        #pragma unused antideamx
}

0 0
  
Back to top
View user's profile Send private message
Theraphy

[Unstoppable]



Status: Offline
(since 02-02-2014 10:54)
Joined: 18 Aug 2012
Posts: 182, Topics: 8
Location: explorer.exe

Reputation: -73.5
Votes: 15

 
Post Posted: 21-08-2012, 10:48:57 | Translate post to: ... (Click for more languages)

Numara masinile nepersonale si aseazale in ordine , apoi in scriptul de personale pune crearea acestora in continuarea celor nepersonale , de exemplu ai masini nepersonale 1-100 , seteaza ca masinile personale sa se creeze de la 101-1000 si seteaza numarul maxim de masini la 1001.La scriptul tau masinile personale se creeaza de la 1 , astfel de fiecare data cand cineva cumpara o masina aceasta ii va lua locul masinii existente cu numarul 1 , in cazul tau cea de NG


0 0
  
Back to top
View user's profile Send private message
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Freakz Forum Index -> Trash Bin -> Trash -> Programming / Scripting / Database  


The time now is 09-11-2024, 00:46:18
Copyright info

Based on phpBB ro/com
B

 
 
 







I forgot my password


This message appears only once, so
like us now until it's too late ! :D
x