if(strcmp(cmd, \"/újkocsi\", true) == 0){ if(IsPlayerConnected(playerid)){ if (!Admin(playerid, 6)) { return 1; } new proplev = UresKocsiKereses(); if(proplev == -1) { format(string, sizeof(string), \"Max %d a megengedett kocsi!\", sizeof(CarInfo)); SendClientMessage(playerid, COLOR_RED, string); return 1; } tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid,COLOR_LIGHTBLUE,\"SuckLife//: RPG: /újkocsi [Modelid] [ár]\"); return 1; } new ez = strval(tmp); tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid,COLOR_LIGHTBLUE,\"SuckLife//: RPG: /újkocsi [Modelid] [ár]\"); return 1; } new az = strval(tmp); if(ez > 611 || ez < 400) { SendClientMessage(playerid,COLOR_WHITE,\"A ModelID-nek 400 felett és 611 alatt kell lenie!\"); return 1; } GetPlayerName(playerid, sendername, sizeof(sendername)); format(string,sizeof(string),\"<< Tulajdonos %s új kocsit rakott le! A kocsi idje: %d, model id: %d, ár: %d >>\",sendername,proplev,ez,az); SendTAdminMessage(COLOR_TULAJ,string); new iStr[29]; format(iStr, sizeof(iStr), \"cfg-k/Kocsik/%d.ini\", proplev); if(INI_Open(iStr)) { CarInfo[proplev][cModel] = ez; CarInfo[proplev][cValue] = az; strmid(CarInfo[proplev][cOwner], \"Valaki\", 0, strlen(\"Valaki\"), 999); new Float:X,Float:Y,Float:Z; GetPlayerPos(playerid,X,Y,Z); CarInfo[proplev][cLocationx] = X; CarInfo[proplev][cLocationy] = Y; CarInfo[proplev][cLocationz] = Z; CarInfo[proplev][cAngle] = 0; CarInfo[proplev][cColorOne] = 0; CarInfo[proplev][cColorTwo] = 0; CarInfo[proplev][cLicense] = 0; CarInfo[proplev][cOwned] = 0; CarInfo[proplev][cLock] = 0; CarInfo[proplev][cRendszamVane] = 1; CarInfo[proplev][cKerek] = 0; CarInfo[proplev][cPaintjob] = 0; CarInfo[proplev][cKinezet1] = 0; CarInfo[proplev][cKinezet2] = 0; CarInfo[proplev][cKinezet3] = 0; CarInfo[proplev][cKinezet4] = 0; CarInfo[proplev][cKinezet5] = 0; CarInfo[proplev][cKinezet6] = 0; CarInfo[proplev][cKinezet7] = 0; CarInfo[proplev][cKinezet8] = 0; CarInfo[proplev][cKinezet9] = 0; CarInfo[proplev][cKinezet10] = 0; CarInfo[proplev][cNitro] = 0; CarInfo[proplev][cHidraulika] = 0; CarInfo[proplev][cVan] = 1; INI_WriteInt(\"Model\", CarInfo[proplev][cModel]); INI_WriteFloat(\"Locationx\", CarInfo[proplev][cLocationx]); INI_WriteFloat(\"Locationy\", CarInfo[proplev][cLocationy]); INI_WriteFloat(\"Locationz\", CarInfo[proplev][cLocationz]); INI_WriteFloat(\"Angle\", CarInfo[proplev][cAngle]); INI_WriteInt(\"ColorOne\", CarInfo[proplev][cColorOne]); INI_WriteInt(\"ColorTwo\", CarInfo[proplev][cColorTwo]); INI_WriteString(\"Owner\", CarInfo[proplev][cOwner]); INI_WriteString(\"Description\", CarInfo[proplev][cDescription]); INI_WriteInt(\"Value\", CarInfo[proplev][cValue]); INI_WriteInt(\"License\", CarInfo[proplev][cLicense]); INI_WriteInt(\"Owned\", CarInfo[proplev][cOwned]); INI_WriteInt(\"Lock\", CarInfo[proplev][cLock]); INI_WriteString(\"Rendszam\", CarInfo[proplev][cRendszam]); INI_WriteInt(\"RendszamVane\", CarInfo[proplev][cRendszamVane]); INI_WriteInt(\"Kerek\", CarInfo[proplev][cKerek]); INI_WriteInt(\"Paintjob\", CarInfo[proplev][cPaintjob]); INI_WriteInt(\"Kinezet1\", CarInfo[proplev][cKinezet1]); INI_WriteInt(\"Kinezet2\", CarInfo[proplev][cKinezet2]); INI_WriteInt(\"Kinezet3\", CarInfo[proplev][cKinezet3]); INI_WriteInt(\"Kinezet4\", CarInfo[proplev][cKinezet4]); INI_WriteInt(\"Kinezet5\", CarInfo[proplev][cKinezet5]); INI_WriteInt(\"Kinezet6\", CarInfo[proplev][cKinezet6]); INI_WriteInt(\"Kinezet7\", CarInfo[proplev][cKinezet7]); INI_WriteInt(\"Kinezet8\", CarInfo[proplev][cKinezet8]); INI_WriteInt(\"Kinezet9\", CarInfo[proplev][cKinezet9]); INI_WriteInt(\"Kinezet10\", CarInfo[proplev][cKinezet10]); INI_WriteInt(\"Nitro\", CarInfo[proplev][cNitro]); INI_WriteInt(\"Hidraulika\", CarInfo[proplev][cHidraulika]); INI_WriteInt(\"Van\", CarInfo[proplev][cVan]); INI_Save(); INI_Close(); } SaveCarCoords(); DestroyVehicle(proplev); CreateVehicle(CarInfo[proplev][cModel],CarInfo[proplev][cLocationx],CarInfo[proplev][cLocationy],CarInfo[proplev][cLocationz]+1.0,CarInfo[proplev][cAngle],CarInfo[proplev][cColorOne],CarInfo[proplev][cColorTwo],-1); return 1;}}
if(strcmp(cmd, \"/újkocsi\", true) == 0){ if(IsPlayerConnected(playerid)){ if (!Admin(playerid, ) { return 1; } new proplev GetPlayerName(playerid, sendername, sizeof(sendername)); format(string,sizeof(string),\"<< Tulajdonos %s lerakott egy 411-es id-jû kocsit(Infernus) >>\",sendername); SendTAdminMessage(COLOR_TULAJ,string); new iStr[29]; format(iStr, sizeof(iStr), \"cfg-k/Kocsik/%d.ini\", proplev); if(INI_Open(iStr)) { CarInfo[proplev][cModel] = 411; strmid(CarInfo[proplev][cOwner], \"Valaki\", 0, strlen(\"Valaki\"), 999); new Float:X,Float:Y,Float:Z; GetPlayerPos(playerid,X,Y,Z); CarInfo[proplev][cLocationx] = X; CarInfo[proplev][cLocationy] = Y; CarInfo[proplev][cLocationz] = Z; CarInfo[proplev][cAngle] = 0; CarInfo[proplev][cColorOne] = 0; CarInfo[proplev][cColorTwo] = 0; CarInfo[proplev][cLicense] = 0; CarInfo[proplev][cOwned] = 0; CarInfo[proplev][cLock] = 0; CarInfo[proplev][cRendszamVane] = 1; CarInfo[proplev][cKerek] = 0; CarInfo[proplev][cPaintjob] = 0; CarInfo[proplev][cKinezet1] = 0; CarInfo[proplev][cKinezet2] = 0; CarInfo[proplev][cKinezet3] = 0; CarInfo[proplev][cKinezet4] = 0; CarInfo[proplev][cKinezet5] = 0; CarInfo[proplev][cKinezet6] = 0; CarInfo[proplev][cKinezet7] = 0; CarInfo[proplev][cKinezet8] = 0; CarInfo[proplev][cKinezet9] = 0; CarInfo[proplev][cKinezet10] = 0; CarInfo[proplev][cNitro] = 0; CarInfo[proplev][cHidraulika] = 0; CarInfo[proplev][cVan] = 1; INI_WriteInt(\"Model\", CarInfo[proplev][cModel]); INI_WriteFloat(\"Locationx\", CarInfo[proplev][cLocationx]); INI_WriteFloat(\"Locationy\", CarInfo[proplev][cLocationy]); INI_WriteFloat(\"Locationz\", CarInfo[proplev][cLocationz]); INI_WriteFloat(\"Angle\", CarInfo[proplev][cAngle]); INI_WriteInt(\"ColorOne\", CarInfo[proplev][cColorOne]); INI_WriteInt(\"ColorTwo\", CarInfo[proplev][cColorTwo]); INI_WriteString(\"Owner\", CarInfo[proplev][cOwner]); INI_WriteString(\"Description\", CarInfo[proplev][cDescription]); INI_WriteInt(\"License\", CarInfo[proplev][cLicense]); INI_WriteInt(\"Owned\", CarInfo[proplev][cOwned]); INI_WriteInt(\"Lock\", CarInfo[proplev][cLock]); INI_WriteString(\"Rendszam\", CarInfo[proplev][cRendszam]); INI_WriteInt(\"RendszamVane\", CarInfo[proplev][cRendszamVane]); INI_WriteInt(\"Kerek\", CarInfo[proplev][cKerek]); INI_WriteInt(\"Paintjob\", CarInfo[proplev][cPaintjob]); INI_WriteInt(\"Kinezet1\", CarInfo[proplev][cKinezet1]); INI_WriteInt(\"Kinezet2\", CarInfo[proplev][cKinezet2]); INI_WriteInt(\"Kinezet3\", CarInfo[proplev][cKinezet3]); INI_WriteInt(\"Kinezet4\", CarInfo[proplev][cKinezet4]); INI_WriteInt(\"Kinezet5\", CarInfo[proplev][cKinezet5]); INI_WriteInt(\"Kinezet6\", CarInfo[proplev][cKinezet6]); INI_WriteInt(\"Kinezet7\", CarInfo[proplev][cKinezet7]); INI_WriteInt(\"Kinezet8\", CarInfo[proplev][cKinezet8]); INI_WriteInt(\"Kinezet9\", CarInfo[proplev][cKinezet9]); INI_WriteInt(\"Kinezet10\", CarInfo[proplev][cKinezet10]); INI_WriteInt(\"Nitro\", CarInfo[proplev][cNitro]); INI_WriteInt(\"Hidraulika\", CarInfo[proplev][cHidraulika]); INI_WriteInt(\"Van\", CarInfo[proplev][cVan]); INI_Save(); INI_Close(); } SaveCarCoords(); DestroyVehicle(proplev); CreateVehicle(411,-803.2530,1523.0657,27.3170,CarInfo[proplev][cAngle],CarInfo[proplev][cColorOne],CarInfo[proplev][cColorTwo],-1); return 1;}}