CMD:v(playerid, params[]){new id, color1, color2, rendszam[12];sscanf(params, \"ddds[12]\", id, color1, color2, rendszam);if(!id || !color1 || !color2) return SendClientMessage(playerid, -1, \"Használat: /v [iD] [szín1] [szín2] [Rendszám]\");if(id < 400 || id > 603) return SendClientMessage(playerid, -1, \"Hibás ID.\");new Float:X, Float:Y, Float:Z, carid;GetPlayerPos(playerid, X, Y, Z);carid = CreateVehicle(id, X+1, Y+1, Z+1, 0, color1, color2, 0);SetVehicleNumberPlate(carid, rendszam);return 1;}
CMD:v(playerid, params[]){new id, color1, color2, rendszam[12];sscanf(params, \"ddds[12]\", id, color1, color2, rendszam);if(!id || !color1 || !color2) return SendClientMessage(playerid, -1, \"Használat: /v [iD] [szín1] [szín2] [Rendszám]\");if(id < 400 || id > 603) return SendClientMessage(playerid, -1, \"Hibás ID.\");new Float:X, Float:Y, Float:Z, carid;GetPlayerPos(playerid, X, Y, Z);carid = CreateVehicle(id, X+1, Y+1, Z+1, 0, color1, color2, 0);SetVehicleNumberPlate(carid, rendszam);return 1;} Teszteltem, mûködik.
native IsValidVehicle(vehicleid);new LekertJarmu[MAX_PLAYERS];public OnPlayerDisconnect(playerid, reason){ if(IsValidVehicle(LekertJarmu[playerid])) DestroyVehicle(LekertJarmu[playerid]); return 1;}public OnPlayerConnect(playerid){ LekertJarmu[playerid] = 0; return 1;}CMD:v(playerid, params[]){new id, color1, color2, rendszam[12];sscanf(params, \"ddds[12]\", id, color1, color2, rendszam);if(!id || !color1 || !color2) return SendClientMessage(playerid, -1, \"Használat: /v [iD] [szín1] [szín2] [Rendszám]\");if(id < 400 || id > 603) return SendClientMessage(playerid, -1, \"Hibás ID.\");new Float:X, Float:Y, Float:Z;GetPlayerPos(playerid, X, Y, Z);if(IsValidVehicle(LekertJarmu[playerid])) DestroyVehicle(LekertJarmu[playerid]);LekertJarmu[playerid] = CreateVehicle(id, X+1, Y+1, Z+1, 0, color1, color2, 0);SetVehicleNumberPlate(LekertJarmu[playerid], rendszam);return 1;}