Szerző Téma: Kocsi Betöltés  (Megtekintve 1703 alkalommal)

Kocsi Betöltés
« Dátum: 2017. január 11. - 22:35:27 »
0 Show voters
Sziasztok! Valaki át tudná írni nekem ezt a kódot, úgy, hogy amikor a játékos lelép csak akkor spawnoljanak le a kocsijai és amikor lelép törlödjenek?  Meg, hogy lehessen legalább 5 kocsija egy embernek ne csak egy. Én ehhez valahogy hülye vagyok nem akar összejönni működőképesen :) (Tudom ez nem ZCMD de átírom majd (Netről töltöttem) ) Előre is köszönöm ha valaki segít nekem!
 

#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];
forward ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5);
forward SaveTool();
forward Carlabel(playerid);
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[model] = dini_Int(\"PersonalCars/cars.cfg\",loader);
format(loader,sizeof(loader),\"veh_owned_%d\",i);
VehicleSystem[owned] = dini_Int(\"PersonalCars/cars.cfg\",loader);
format(loader,sizeof(loader),\"veh_cLock_%d\",i);
VehicleSystem[cLock] = dini_Int(\"PersonalCars/cars.cfg\",loader);
format(loader,sizeof(loader),\"veh_owner_%d\",i);
    strmid(VehicleSystem[owner],dini_Get(\"PersonalCars/cars.cfg\",loader),0,128,128);
format(loader,sizeof(loader),\"veh_x_%d\",i);
VehicleSystem
  • = dini_Float(\"PersonalCars/cars.cfg\",loader);

format(loader,sizeof(loader),\"veh_y_%d\",i);
VehicleSystem[y] = dini_Float(\"PersonalCars/cars.cfg\",loader);
format(loader,sizeof(loader),\"veh_z_%d\",i);
VehicleSystem[z] = dini_Float(\"PersonalCars/cars.cfg\",loader);
format(loader,sizeof(loader),\"veh_Farbe1_%d\",i);
VehicleSystem[Farbe1] = dini_Int(\"PersonalCars/cars.cfg\",loader);
format(loader,sizeof(loader),\"veh_Farbe2_%d\",i);
VehicleSystem[Farbe2] = dini_Int(\"PersonalCars/cars.cfg\",loader);
format(loader,sizeof(loader),\"veh_a_%d\",i);
VehicleSystem[a] = dini_Float(\"PersonalCars/cars.cfg\",loader);
    format(loader,sizeof(loader),\"veh_owner_%d\",i);
    strmid(VehicleSystem[owner],dini_Get(\"PersonalCars/cars.cfg\",loader),0,128,128);
format(loader,sizeof(loader),\"veh_preis_%d\",i);
VehicleSystem[preis] = dini_Int(\"PersonalCars/cars.cfg\",loader);
//
format(loader,sizeof(loader),\"veh_mod1_%d\",i);
VehicleSystem[mod1] = dini_Int(\"PersonalCars/cars.cfg\",loader);
format(loader,sizeof(loader),\"veh_mod2_%d\",i);
VehicleSystem[mod2] = dini_Int(\"PersonalCars/cars.cfg\",loader);
format(loader,sizeof(loader),\"veh_mod3_%d\",i);
VehicleSystem[mod3] = dini_Int(\"PersonalCars/cars.cfg\",loader);
format(loader,sizeof(loader),\"veh_mod4_%d\",i);
VehicleSystem[mod4] = dini_Int(\"PersonalCars/cars.cfg\",loader);
format(loader,sizeof(loader),\"veh_mod5_%d\",i);
VehicleSystem[mod5] = dini_Int(\"PersonalCars/cars.cfg\",loader);
format(loader,sizeof(loader),\"veh_mod6_%d\",i);
VehicleSystem[mod6] = dini_Int(\"PersonalCars/cars.cfg\",loader);
format(loader,sizeof(loader),\"veh_mod7_%d\",i);
VehicleSystem[mod7] = dini_Int(\"PersonalCars/cars.cfg\",loader);
format(loader,sizeof(loader),\"veh_mod8_%d\",i);
VehicleSystem[mod8] = dini_Int(\"PersonalCars/cars.cfg\",loader);
format(loader,sizeof(loader),\"veh_mod9_%d\",i);
VehicleSystem[mod9] = dini_Int(\"PersonalCars/cars.cfg\",loader);
format(loader,sizeof(loader),\"veh_mod10_%d\",i);
VehicleSystem[mod10] = dini_Int(\"PersonalCars/cars.cfg\",loader);
format(loader,sizeof(loader),\"veh_mod11_%d\",i);
VehicleSystem[mod11] = dini_Int(\"PersonalCars/cars.cfg\",loader);
format(loader,sizeof(loader),\"veh_mod12_%d\",i);
VehicleSystem[mod12] = dini_Int(\"PersonalCars/cars.cfg\",loader);
format(loader,sizeof(loader),\"veh_mod13_%d\",i);
VehicleSystem[mod13] = dini_Int(\"PersonalCars/cars.cfg\",loader);
format(loader,sizeof(loader),\"veh_mod14_%d\",i);
VehicleSystem[mod14] = dini_Int(\"PersonalCars/cars.cfg\",loader);
format(loader,sizeof(loader),\"veh_mod15_%d\",i);
VehicleSystem[mod15] = dini_Int(\"PersonalCars/cars.cfg\",loader);
format(loader,sizeof(loader),\"veh_mod16_%d\",i);
VehicleSystem[mod16] = dini_Int(\"PersonalCars/cars.cfg\",loader);
format(loader,sizeof(loader),\"veh_mod17_%d\",i);
VehicleSystem[mod17] = dini_Int(\"PersonalCars/cars.cfg\",loader);
//
format(loader,sizeof(loader),\"veh_paint_%d\",i);
VehicleSystem[paintjob] = dini_Int(\"PersonalCars/cars.cfg\",loader);
new car = CreateVehicle(VehicleSystem[model],VehicleSystem
  • ,VehicleSystem[y],VehicleSystem[z],VehicleSystem[a],VehicleSystem[Farbe1],VehicleSystem[Farbe2],600000);

//
    if(VehicleSystem[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} kocsija\",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),\"Ez a kocsi eladó, ára: %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]
  • ,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, \"/kocsi\", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
        new x_nr[64];
        x_nr = strtok(cmdtext, idx);
        if(!strlen(x_nr))
        {
            SendClientMessage(playerid, COLOR_GREY, \"Használat: /kocsi utasítás\");
            SendClientMessage(playerid, COLOR_WHITE, \"park, bezar, kinyit, pozicio\");
            return 1;
        }
        if(strcmp(x_nr,\"bezar\",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~Kocsi~n~~g~Zarva\");
      GameTextForPlayer(playerid, string, 4000, 3);
      VehicleSystem[GetCreatorID(personalcar)][cLock]=0;
      GetPlayerName(playerid, sendername, sizeof(sendername));
      format(string,sizeof(string), \"* %s A kocsi zárva!\", sendername);
      ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
      SaveTool();
      return 1;
      }
      }
      }
      else if(strcmp(x_nr,\"kinyit\",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~Kocsi~n~~g~Kinyitva\");
      GameTextForPlayer(playerid, string, 4000, 3);
      GetPlayerName(playerid, sendername, sizeof(sendername));
      format(string,sizeof(string), \"* %s Kocsi kinyitva!\", 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)]
  • =vx;

      VehicleSystem[GetCreatorID(vehicleid)][y]=vy;
      VehicleSystem[GetCreatorID(vehicleid)][z]=vz;
      VehicleSystem[GetCreatorID(vehicleid)][a]=va;
      SetVehicleHealth(GetPlayerVehicleID(playerid),100.0);
      SendClientMessage(playerid,WHITE,\"Sikeresen leparkoltad a kocsid!\");
      SendClientMessage(playerid,YELLOW,\"Mostantól mindig itt találod!\");
      SaveTool();
      }
      }
      return 1;
      }
            else if(strcmp(x_nr,\"pozicio\",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~A kocsid bejelolve\", 2500, 3); return 1; }
         SendClientMessage(playerid,COLOR_WHITE,\"Kocsid bejelőlve!\");
         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)]
  • =(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]
  • =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]
  • ,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, \"/kocsivesz\", 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,\"!\");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,\"Sikeresen megvásároltad!\");
SendClientMessage(playerid,WHITE,\" Kocsi parancsokért /kocsi\");
TogglePlayerControllable(playerid,1);
Delete3DTextLabel(TextUpCar[vehicleid]);
SaveTool();
}
else
{
SendClientMessage(playerid,WHITE,\"Nincs elég pénzed\");
}
}
else
{
SendClientMessage(playerid,WHITE,\"Ez a kocsi nem eladó!\");
}
}
else
{
SendClientMessage(playerid, ORANGE,\"Neked már van kocsid\");
}
}
else
{
SendClientMessage(playerid,WHITE,\"Ez nem eladó!\");
}
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, \"/elad\", true) ==0)
{
if(!IsPlayerInAnyVehicle(playerid)){return 1;}
if(GetCreatorID(vehicleid)!=0)
{
if (IsPlayerAdmin(playerid))
{
tmp = strtok(cmdtext,idx);
if(!strlen(tmp)){SendClientMessage(playerid,WHITE,\"/elad ár\");return 1;}
new Float:vx,Float:vy,Float:vz,Float:va;
GetVehiclePos(GetPlayerVehicleID(playerid),vx,vy,vz);
GetVehicleZAngle(GetPlayerVehicleID(playerid),va);
VehicleSystem[GetCreatorID(vehicleid)]
  • =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,\"Ez a kocsi újra eladó!\");
SaveTool();
Delete3DTextLabel(TextUpCar[vehicleid]);
format(TextCar,sizeof(TextCar),\"Ez a kocsi eladó: %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: Nem vagy admin!\");
}
}
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)]
  • =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,\" Te ezt nem teheted meg!\");
}
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, \"/deleteowner\", true)==0)
{
   if ((IsPlayerAdmin(playerid)))
   {
      tmp = strtok(cmdtext, idx);
      if(!strlen(tmp))
      {
         SendClientMessage(playerid, WHITE, \"Használat: /deleteowner ID\");
         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, \"Tulajdonos Törölve\");
   }
   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 Kocsija\",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),\"Ez a kocsi leadó ennyiért: %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,\" /kocsi a kocsi parancsaiért\");
      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),\"Ez a kocsi eladó: %d$\",VehicleSystem[GetCreatorID(vehicleid)][preis]);
    SendClientMessage(playerid,WHITE,fffx);
    SendClientMessage(playerid,YELLOW,\"/Kocsivesz\");
    }
    else
    {
    TogglePlayerControllable(playerid,0);
    TogglePlayerControllable(playerid,1);
    new ex[128];
    format(ex,sizeof(ex),\"Ez a %s kocsija\",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[0]==componentid) { return 1; }
}
for(i=0; i<3; i++)
{
    if(nitro[0]==componentid) { return 2; }
}
for(i=0; i<23; i++)
{
    if(fbumper[0]==componentid) { return 3; }
}
for(i=0; i<22; i++)
{
    if(rbumper[0]==componentid) { return 4; }
}
for(i=0; i<28; i++)
{
    if(exhaust[0]==componentid) { return 5; }
}
for(i=0; i<2; i++)
{
    if(bventr[0]==componentid) { return 6; }
}
for(i=0; i<2; i++)
{
    if(bventl[0]==componentid) { return 7; }
}
for(i=0; i<4; i++)
{
    if(bscoop[0]==componentid) { return 8; }
}
for(i=0; i<13; i++)
{
    if(rscoop[0]==componentid) { return 9; }
}
for(i=0; i<21; i++)
{
    if(lskirt[0]==componentid) { return 10; }
}
for(i=0; i<21; i++)
{
    if(rskirt[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[0]==componentid) { return 14; }
}
for(i=0; i<2; i++)
{
    if(fbbars[0]==componentid) { return 15; }
}
for(i=0; i<17; i++)
{
    if(wheels[0]==componentid) { return 16; }
}
for(i=0; i<2; i++)
{
    if(lights[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[model]!=0)
{
count++;
    format(saver,sizeof(saver),\"veh_model_%d\",count);
    dini_IntSet(\"PersonalCars/cars.cfg\",saver,VehicleSystem[model]);
    format(saver,sizeof(saver),\"veh_owned_%d\",count);
    dini_IntSet(\"PersonalCars/cars.cfg\",saver,VehicleSystem[owned]);
    format(saver,sizeof(saver),\"veh_cLock_%d\",count);
    dini_IntSet(\"PersonalCars/cars.cfg\",saver,VehicleSystem[cLock]);
    format(saver,sizeof(saver),\"veh_x_%d\",count);
    dini_FloatSet(\"PersonalCars/cars.cfg\",saver,VehicleSystem
  • );

    format(saver,sizeof(saver),\"veh_y_%d\",count);
    dini_FloatSet(\"PersonalCars/cars.cfg\",saver,VehicleSystem[y]);
    format(saver,sizeof(saver),\"veh_z_%d\",count);
    dini_FloatSet(\"PersonalCars/cars.cfg\",saver,VehicleSystem[z]);
    format(saver,sizeof(saver),\"veh_a_%d\",count);
    dini_FloatSet(\"PersonalCars/cars.cfg\",saver,VehicleSystem[a]);
    format(saver,sizeof(saver),\"veh_Farbe1_%d\",count);
    dini_IntSet(\"PersonalCars/cars.cfg\",saver,VehicleSystem[Farbe1]);
    format(saver,sizeof(saver),\"veh_Farbe2_%d\",count);
    dini_IntSet(\"PersonalCars/cars.cfg\",saver,VehicleSystem[Farbe2]);
    format(saver,sizeof(saver),\"veh_owner_%d\",count);
    dini_Set(\"PersonalCars/cars.cfg\",saver,VehicleSystem[owner]);
    format(saver,sizeof(saver),\"veh_preis_%d\",count);
    dini_IntSet(\"PersonalCars/cars.cfg\",saver,VehicleSystem[preis]);
    //
format(saver,sizeof(saver),\"veh_mod1_%d\",count);
dini_IntSet(\"PersonalCars/cars.cfg\",saver,VehicleSystem[mod1]);
format(saver,sizeof(saver),\"veh_mod2_%d\",count);
dini_IntSet(\"PersonalCars/cars.cfg\",saver,VehicleSystem[mod2]);
format(saver,sizeof(saver),\"veh_mod3_%d\",count);
dini_IntSet(\"PersonalCars/cars.cfg\",saver,VehicleSystem[mod3]);
format(saver,sizeof(saver),\"veh_mod4_%d\",count);
dini_IntSet(\"PersonalCars/cars.cfg\",saver,VehicleSystem[mod4]);
format(saver,sizeof(saver),\"veh_mod5_%d\",count);
dini_IntSet(\"PersonalCars/cars.cfg\",saver,VehicleSystem[mod5]);
format(saver,sizeof(saver),\"veh_mod6_%d\",count);
dini_IntSet(\"PersonalCars/cars.cfg\",saver,VehicleSystem[mod6]);
format(saver,sizeof(saver),\"veh_mod7_%d\",count);
dini_IntSet(\"PersonalCars/cars.cfg\",saver,VehicleSystem[mod7]);
format(saver,sizeof(saver),\"veh_mod8_%d\",count);
dini_IntSet(\"PersonalCars/cars.cfg\",saver,VehicleSystem[mod8]);
format(saver,sizeof(saver),\"veh_mod9_%d\",count);
dini_IntSet(\"PersonalCars/cars.cfg\",saver,VehicleSystem[mod9]);
format(saver,sizeof(saver),\"veh_mod10_%d\",count);
dini_IntSet(\"PersonalCars/cars.cfg\",saver,VehicleSystem[mod10]);
format(saver,sizeof(saver),\"veh_mod11_%d\",count);
dini_IntSet(\"PersonalCars/cars.cfg\",saver,VehicleSystem[mod11]);
format(saver,sizeof(saver),\"veh_mod12_%d\",count);
dini_IntSet(\"PersonalCars/cars.cfg\",saver,VehicleSystem[mod12]);
format(saver,sizeof(saver),\"veh_mod13_%d\",count);
dini_IntSet(\"PersonalCars/cars.cfg\",saver,VehicleSystem[mod13]);
format(saver,sizeof(saver),\"veh_mod14_%d\",count);
dini_IntSet(\"PersonalCars/cars.cfg\",saver,VehicleSystem[mod14]);
format(saver,sizeof(saver),\"veh_mod15_%d\",count);
dini_IntSet(\"PersonalCars/cars.cfg\",saver,VehicleSystem[mod15]);
format(saver,sizeof(saver),\"veh_mod16_%d\",count);
dini_IntSet(\"PersonalCars/cars.cfg\",saver,VehicleSystem[mod16]);
format(saver,sizeof(saver),\"veh_mod17_%d\",count);
dini_IntSet(\"PersonalCars/cars.cfg\",saver,VehicleSystem[mod17]);
//
format(saver,sizeof(saver),\"veh_paint_%d\",count);
dini_IntSet(\"PersonalCars/cars.cfg\",saver,VehicleSystem[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} Kocsija\",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),\"Ez a kocsi eladó ennyiért: %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
}
 

 
 

Nem elérhető whadez

  • 719
  • DEFEATER
    • Profil megtekintése
Kocsi Betöltés
« Válasz #1 Dátum: 2017. január 11. - 22:44:15 »
0 Show voters
Szia, miért van rá szükséged? Én megvalósítottam a szerveremen, valószínűleg onnét jött az ötlet.

Nem elérhető Ben

  • 1754
  • Ben apó
    • Profil megtekintése
Kocsi Betöltés
« Válasz #2 Dátum: 2017. január 12. - 07:02:42 »
+2 Show voters
Idézetet írta: DEFEATER date=1484171055


   
      Szia, miért van rá szükséged? Én megvalósítottam a szerveremen, valószínűleg onnét jött az ötlet.
   


nagyképűség

Nem elérhető whadez

  • 719
  • DEFEATER
    • Profil megtekintése
Kocsi Betöltés
« Válasz #3 Dátum: 2017. január 12. - 12:45:40 »
0 Show voters
Idézetet írta: Ben date=1484200962


   
      nagyképűség
   


Az miért nagyképűség hogy én megvalósítottam így valószínűleg tudnék neki segíteni ha válaszolna a kérdésemre? :)

Kocsi Betöltés
« Válasz #4 Dátum: 2017. január 12. - 13:48:37 »
0 Show voters
Nem hinném hogy tőled szedte az ötletet.. Hiszem see-n is így van megoldva! :)

Kocsi Betöltés
« Válasz #5 Dátum: 2017. január 12. - 14:53:22 »
0 Show voters
Se a Seetől se tőled nem vettem az ötletet, mert ezt egy angol oldalról szedtem és magyarosítottam le 2010-es script a betöltösdi ötlet meg a PPC_Trucking módból jött. Azért kellene, mert nem akarom, hogy a kocsik akkor is ott legyenek ha a pasas már mondjuk egy hónapja nem volt fent

Nem elérhető whadez

  • 719
  • DEFEATER
    • Profil megtekintése
Kocsi Betöltés
« Válasz #6 Dátum: 2017. január 12. - 15:18:46 »
0 Show voters
Soha nem see-ztem, és nem is fogok, így nem tudom hogy ott mi a helyzet. Ha SQL-be lenne megírva a kocsi rendszered eltudnám rá küldeni az alapomat, de így dinivel vagy mi ez így sajnos nem.  :)

Kocsi Betöltés
« Válasz #7 Dátum: 2017. január 12. - 15:30:35 »
0 Show voters
Hiába dícséri mindenki az SQL-t nekem valahogy a dini meg a dfile jobban beváltak (volt SQL-es szerverem is) Elvileg az eljárás ugyan az csak dininél másképp tölti be és menti nem muszáj küldnötök semmit csak arra lennék kíváncsi, hogy ti hogyan oldanátok meg?

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal