CMD:jarmuvasarlas(playerid,params[]){/*------*/new tipus[64], szin1, szin2;if (Belepve[playerid] != 0){/*------*/if(sscanf(params,\"sdd\",tipus,szin1,szin2))return SendClientMessage(playerid,SZURKE,\"Használat: /jarmuvasarlas [Típus] [szín 1] [szín 2]\");{new tipusar;new tipusid;if(!strcmp(tipus, \"bobcat\", true)) { tipusar = 5000000; }if(!strcmp(tipus, \"bobcat\", true)) { tipusid = 422; }if(!strcmp(tipus, \"huntley\", true)) { tipusar = 6000000; }if(!strcmp(tipus, \"huntley\", true)) { tipusid = 579; }if(!strcmp(tipus, \"clover\", true)) { tipusar = 4000000; }if(!strcmp(tipus, \"clover\", true)) { tipusid = 542; }if(!strcmp(tipus, \"manana\", true)) { tipusar = 2500000; }if(!strcmp(tipus, \"manana\", true)) { tipusid = 410; }if(!strcmp(tipus, \"oceanic\", true)) { tipusar = 7000000; }if(!strcmp(tipus, \"oceanic\", true)) { tipusid = 467; }if(!strcmp(tipus, \"greenwood\", true)) { tipusar = 6500000; }if(!strcmp(tipus, \"greenwood\", true)) { tipusid = 492; }if(!strcmp(tipus, \"tampa\", true)) { tipusar = 6000000; }if(!strcmp(tipus, \"tampa\", true)) { tipusid = 549; }if(!strcmp(tipus, \"faggio\", true)) { tipusar = 750000; }if(!strcmp(tipus, \"faggio\", true)) { tipusid = 462; }if(!strcmp(tipus, \"freeway\", true)) { tipusar = 5000000; }if(!strcmp(tipus, \"freeway\", true)) { tipusid = 463; }if(!strcmp(tipus, \"pcj600\", true)) { tipusar = 5000000; }if(!strcmp(tipus, \"pcj600\", true)) { tipusid = 461; }if(!strcmp(tipus, \"sanchez\", true)) { tipusar = 5000000; }if(!strcmp(tipus, \"sanchez\", true)) { tipusid = 468; }if(!strcmp(tipus, \"blade\", true)) { tipusar = 5000000; }if(!strcmp(tipus, \"blade\", true)) { tipusid = 536; }if(!strcmp(tipus, \"savanna\", true)) { tipusar = 6500000; }if(!strcmp(tipus, \"savanna\", true)) { tipusid = 567; }if(!strcmp(tipus, \"feltzer\", true)) { tipusar = 5500000; }if(!strcmp(tipus, \"feltzer\", true)) { tipusid = 533; }if(IsPlayerInRangeOfPoint(playerid, 1.5, 215.8647,14.5802,2.5708)){ if(JatekosInfo[playerid][bank] >= tipusar) { new file[ 64 ]; for( new x = 1; x < 100; ++x ) { format( file, sizeof file, \"/Adatbazis/Jarmuvek/%d.ini\", x ); if( fexist( file ) ) continue; new string[128],jarmu; JatekosInfo[playerid][bank] -= tipusar; GetPlayerName(playerid,nev,sizeof(nev)); format(string,sizeof(string),\"%s vett egy %s-t.\", nev,tipus); AdminnakUzenet(VNARANCS, string, 1); printf(string); jarmu = AddStaticVehicle(tipusid, 218.1325,7.9003,2.2991, 269.9501, szin1, szin2); JarmuInfo[jarmu][szin1] = szin1; JarmuInfo[jarmu][szin2] = szin2; format(JarmuInfo[jarmu][Tulaj], 22, \"%s\", nev); JarmuInfo[jarmu][Eladva] = 1; JarmuInfo[jarmu][iD] = x; JarmuInfo[jarmu][Zarva] = 0; JatekosInfo[playerid][Jarmu] = x; dini_Create(file); // Létrehozzuk! dini_Set(file,\"Tulaj\", nev); dini_IntSet(file, \"Model\", tipusid); dini_IntSet(file,\"Szín1\", szin1); dini_IntSet(file,\"Szín2\", szin2); dini_IntSet(file,\"Eladva\", 1); dini_IntSet(file,\"ID\", x); dini_FloatSet(file,\"X\", 218.1325); dini_FloatSet(file,\"Y\", 7.9003); dini_FloatSet(file,\"Z\", 2.2991); dini_FloatSet(file,\"Forgatás\", 269.9501); dini_IntSet(file,\"Zárva\", 0); break; } } else { new string[256]; format(string,sizeof(string),\"Nincs elég pénzed! (%d Ft)\", tipusar); SendClientMessage(playerid, HIBA, string); return 1; }}else SendClientMessage(playerid, HIBA, \"Nem vagy a gyárnál!\");}}else SendClientMessage(playerid, HIBA, \"Be kell jelentkezned!\");return 1;}
if(oldstate == PLAYER_STATE_DRIVER) { new file[256];new vehid = GetPlayerVehicleID(playerid); new Float:x,Float:y,Float:z,Float:forgatas; GetVehiclePos(vehid,x,y,z); GetVehicleZAngle(vehid,forgatas); new fajlneve; fajlneve = JarmuInfo[vehid][iD]; format(file,sizeof(file),\"/Adatbazis/Jarmuvek/%d.ini\", fajlneve);dini_FloatSet(file,\"X\", x);dini_FloatSet(file,\"Y\", y);dini_FloatSet(file,\"Z\", z);dini_FloatSet(file,\"Forgatás\", forgatas);dini_IntSet(file,\"Eladva\", JarmuInfo[fajlneve][Eladva]); }
if(oldstate == PLAYER_STATE_DRIVER) { new file[256];new vehid = GetPlayerVehicleID(playerid); new Float:x,Float:y,Float:z,Float:forgatas; GetVehiclePos(vehid,x,y,z); GetVehicleZAngle(vehid,forgatas); new fajlneve; fajlneve = JarmuInfo[vehid][iD]; format(file,sizeof(file),\"/Adatbazis/Jarmuvek/%d.ini\", fajlneve); {dini_FloatSet(file,\"X\", x);dini_FloatSet(file,\"Y\", y);dini_FloatSet(file,\"Z\", z);dini_FloatSet(file,\"Forgatás\", forgatas);dini_IntSet(file,\"Eladva\", JarmuInfo[fajlneve][Eladva]);