CMD:v(playerid, params[]){new Index; new tmp[256]; tmp = strtok(params,Index);new tmp2[256]; tmp2 = strtok(params,Index);new tmp3[256]; tmp3 = strtok(params,Index); if(!strlen(tmp)) returnSendClientMessage(playerid, 0, \"{\"piros\"}Használat: /v [Jármû Név / Jármû ID] [szín 1] [szín 2]\");new car;new string[500];new colour1, colour2; if(!IsNumeric(tmp)) car = GetVehicleModelIDFromName(tmp); else car = strval(tmp);if(car < 400 || car > 611) return SendClientMessage(playerid, 0, \"{\"piros\"}Nincs ilyen jármû!\");if(!strlen(tmp2)) colour1 = random(126); else colour1 = strval(tmp2);if(!strlen(tmp3)) colour2 = random(126); else colour2 = strval(tmp3); if(SpawnedVehicles[playerid] != 0) DestroyVehicle(SpawnedVehicles[playerid]);new Float:X,Float:Y,Float:Z;new Float:Angle,int1;new LVehicleID = GetPlayerVehicleID(playerid);GetPlayerPos(playerid, X,Y,Z);GetPlayerFacingAngle(playerid,Angle);int1 = GetPlayerInterior(playerid);SpawnedVehicles[playerid] = CreateVehicle(car, X+3,Y,Z, Angle, colour1, colour2, -1);LinkVehicleToInterior(LVehicleID,int1);PlayerPlaySound(playerid,1085,0,0,0);PutPlayerInVehicle(playerid,SpawnedVehicles[playerid],0);format(string, sizeof(string), \"{33AA33}Jármû lekérve! | Jármû Név: {FF9933}%s {33AA33}| Model ID: {FF9933}%d {33AA33}| Szín 1: {FF9933}%d {33AA33}| Szín 2: {FF9933}%d\", VehicleNames[car-400], car, colour1, colour2);SendClientMessage(playerid,0,string);return 1;}
CMD:v2(playerid, params[]){new car,color1, color2;if(sscanf(params, \"k(vehicles)D(-1)D(-1)\", car, color1, color2)) SendClientMessage(playerid, 0x0000ff, \"Használat: /v [Jármû Név / Jármû ID (400-611)] [szín 1] [szín 2]\");else{if(color1 == -1) color1 = random(255);if(color2 == -1) color2 = random(255);if(SpawnedVehicles[playerid] != 0) DestroyVehicle(SpawnedVehicles[playerid]);new Float:X, Float:Y, Float:Z, Float:Angle;GetPlayerPos(playerid, X, Y, Z);GetPlayerFacingAngle(playerid, Angle);SpawnedVehicles[playerid] = CreateVehicle(car, X+3, Y, Z, Angle, color1, color2, -1);LinkVehicleToInterior(SpawnedVehicles[playerid], GetPlayerInterior(playerid));PlayerPlaySound(playerid, 1085, 0, 0, 0);PutPlayerInVehicle(playerid, SpawnedVehicles[playerid], 0);new str[128];format(str, sizeof(str), \"{33AA33}Jármû lekérve! | Jármû Név: {FF9933}%s {33AA33}| Model ID: {FF9933}%d {33AA33}| Szín 1: {FF9933}%d {33AA33}| Szín 2: {FF9933}%d\", VehicleNames[spawnedVehicles[playerid]-400], SpawnedVehicles[playerid], color1, color2);SendClientMessage(playerid, 0, str);}return 1;}
CMD:ujkocsi(playerid, params[]){new Float:X, Float:Y, Float:Z;GetPlayerPos(playerid, X, Y, Z);new Float:Angle;GetPlayerFacingAngle(playerid, Angle);new Modelid, Color1, Color2;if(sscanf(params, \"ddd\", Modelid, Color1, Color2)) return SendHasznalatMessage(playerid, -1, \"/ujkocsi [ModelID] [szín1] [szín2]\");if(Modelid <= 611 && Modelid >= 400){if(Color1 <= 255 && Color1 >= 0){ if(Color2 <= 255 && Color2 >= 0) { CreateVehicle(Modelid, X+2, Y+2, Z, Angle, Color1, Color2, -1); } else { SendHibaMessage(playerid, -1, \"SzínID 0-tól 255-ig!\"); }}else{ SendHibaMessage(playerid, -1, \"SzínID 0-tól 255-ig!\");}}else{ SendHibaMessage(playerid, -1, \"ModelID 400-tól 611-ig!\");}return 1;}