CMD:getcar(playerid, params[]){if(PlayerInfo[playerid] > 2){new str[32];if(sscanf(params, \"s[32]\", str)) return SendClientMessage(playerid, COLOR_WHITE, \"(( Használat: /getcar [rendszam] ))\");else { new file[256]; format(file,sizeof(file),\"Jarmuvek/%d.ini\",vehicleid); for(new i = 0; i < MAX_VEHICLES; i++) { if(strcmp(str, VehicleInfo[vRendszam], true) ==0) { new Float:x, Float:y, Float:z; new kocsiid = GetPlayerVehicleID(i); GetPlayerPos(playerid, Float:x, Float:y, Float:z); SetVehiclePos(kocsiid, Float:x, Float:y, Float:z); break; } else { SendClientMessage(playerid, COLOR_WARNING, \"(( Nem található ilyen rendszámú jármû! ))\"); } }}}else{SendClientMessage(playerid, COLOR_WHITE, \"(( Ismeretlen parancs! ))\");}return 1;}
error 017: undefined symbol \"vehicleid\"
CMD:getcar(playerid, params[]) { if(PlayerInfo[playerid] > 2) { new str[32]; if(sscanf(params, \"s[32]\", str)) return SendClientMessage(playerid, COLOR_WHITE, \"(( Használat: /getcar [rendszam] ))\"); new file[256]; for(new i = 0; i < MAX_VEHICLES; i++) { if(strcmp(str, VehicleInfo[vRendszam], true) ==0) { new Float:x, Float:y, Float:z; new kocsiid = GetPlayerVehicleID(i); GetPlayerPos(playerid, Float:x, Float:y, Float:z); SetVehiclePos(kocsiid, Float:x, Float:y, Float:z); format(file,sizeof(file),\"Jarmuvek/%d.ini\",kocsiid; break; } else { SendClientMessage(playerid, -1, \"(( Nem található ilyen jármû! ))\"); } } } else { SendClientMessage(playerid, COLOR_WHITE, \"(( Ismeretlen parancs! ))\"); } return 1; }
CMD:getcar(playerid, params[]){ new str[32];if(PlayerInfo[playerid] <= 2) return SendClientMessage(playerid, COLOR_WHITE, \"(( Ismeretlen parancs! ))\");if(sscanf(params, \"s[32]\", str)) return SendClientMessage(playerid, COLOR_WHITE, \"(( Használat: /getcar [rendszam] ))\");for(new i = 0; i < MAX_VEHICLES; i++) {if(strcmp(str, VehicleInfo[vRendszam], true) == 0) { new Float:x, Float:y, Float:z; GetPlayerPos(playerid, Float:x, Float:y, Float:z); SetVehiclePos(i, Float:x, Float:y, Float:z); break;} else return SendClientMessage(playerid, COLOR_WARNING, \"(( Nem található ilyen rendszámú jármû! ))\");}return 1;}
Sziasztok!Valamiért csak az 1-es ID-jû jármûvet geteli a többire azt írja h nem létezik. CMD:getcar(playerid, params[]){ new str[32];if(PlayerInfo[playerid] <= 2) return SendClientMessage(playerid, COLOR_WHITE, \"(( Ismeretlen parancs! ))\");else if(sscanf(params, \"s[32]\", str)) return SendClientMessage(playerid, COLOR_WHITE, \"(( Használat: /getcar [rendszam] ))\");for(new i = 0; i < MAX_VEHICLES; i++) {if(strcmp(str, VehicleInfo[vRendszam], true) == 0) { new Float:x, Float:y, Float:z; GetPlayerPos(playerid, Float:x, Float:y, Float:z); SetVehiclePos(i, Float:x, Float:y, Float:z);} else return SendClientMessage(playerid, COLOR_WARNING, \"(( Nem található ilyen rendszámú jármû! ))\");}return 1;} Kocsi betöltés: stock Kocsibetolt(vehicleid){new file[128]; format(file,sizeof(file),\"Jarmuvek/%d.ini\",vehicleid); VehicleInfo[vehicleid][vID] = dini_Int(file, \"vID\");VehicleInfo[vehicleid][vPosx] = dini_Float(file, \"vPosx\");VehicleInfo[vehicleid][vPosy] = dini_Float(file, \"vPosy\");VehicleInfo[vehicleid][vPosz] = dini_Float(file, \"vPosz\");VehicleInfo[vehicleid][vColor1] = dini_Int(file, \"vColor1\");VehicleInfo[vehicleid][vColor2] = dini_Int(file, \"vColor2\");VehicleInfo[vehicleid][vHP] = dini_Int(file, \"vHP\");VehicleInfo[vehicleid][vAzonosito] = dini_Int(file, \"vAzonosito\");format(VehicleInfo[vehicleid][vTulaj],30,\"%s\", dini_Get(file, \"vTulaj\"));format(VehicleInfo[vehicleid][vRendszam],30,\"%s\", dini_Get(file, \"vRendszam\"));CreateVehicle(VehicleInfo[vehicleid][vID], VehicleInfo[vehicleid][vPosx], VehicleInfo[vehicleid][vPosy], VehicleInfo[vehicleid][vPosz], 0, VehicleInfo[vehicleid][vColor1], VehicleInfo[vehicleid][vColor2], -1);SetVehicleNumberPlate(vehicleid, VehicleInfo[vehicleid][vRendszam]);return 1;} for(new i = 0; i < 2000; i++){Kocsibetolt(i);}
CMD:getcar(playerid, params[]){ new str[32];if(PlayerInfo[playerid] <= 2) return SendClientMessage(playerid, COLOR_WHITE, \"(( Ismeretlen parancs! ))\");else if(sscanf(params, \"s[32]\", str)) return SendClientMessage(playerid, COLOR_WHITE, \"(( Használat: /getcar [rendszam] ))\");for(new i = 0; i < MAX_VEHICLES; i++) {if(strcmp(str, VehicleInfo[vRendszam], true) == 0) { new Float:x, Float:y, Float:z; GetPlayerPos(playerid, Float:x, Float:y, Float:z); SetVehiclePos(i, Float:x, Float:y, Float:z);} else return SendClientMessage(playerid, COLOR_WARNING, \"(( Nem található ilyen rendszámú jármû! ))\");}return 1;}
stock Kocsibetolt(vehicleid){new file[128]; format(file,sizeof(file),\"Jarmuvek/%d.ini\",vehicleid); VehicleInfo[vehicleid][vID] = dini_Int(file, \"vID\");VehicleInfo[vehicleid][vPosx] = dini_Float(file, \"vPosx\");VehicleInfo[vehicleid][vPosy] = dini_Float(file, \"vPosy\");VehicleInfo[vehicleid][vPosz] = dini_Float(file, \"vPosz\");VehicleInfo[vehicleid][vColor1] = dini_Int(file, \"vColor1\");VehicleInfo[vehicleid][vColor2] = dini_Int(file, \"vColor2\");VehicleInfo[vehicleid][vHP] = dini_Int(file, \"vHP\");VehicleInfo[vehicleid][vAzonosito] = dini_Int(file, \"vAzonosito\");format(VehicleInfo[vehicleid][vTulaj],30,\"%s\", dini_Get(file, \"vTulaj\"));format(VehicleInfo[vehicleid][vRendszam],30,\"%s\", dini_Get(file, \"vRendszam\"));CreateVehicle(VehicleInfo[vehicleid][vID], VehicleInfo[vehicleid][vPosx], VehicleInfo[vehicleid][vPosy], VehicleInfo[vehicleid][vPosz], 0, VehicleInfo[vehicleid][vColor1], VehicleInfo[vehicleid][vColor2], -1);SetVehicleNumberPlate(vehicleid, VehicleInfo[vehicleid][vRendszam]);return 1;}
for(new i = 0; i < 2000; i++){Kocsibetolt(i);}
CMD:getcar(playerid, params[]){new str[32];if(PlayerInfo[playerid] <= 2) return SendClientMessage(playerid, COLOR_WHITE, \"(( Ismeretlen parancs! ))\");if(sscanf(params, \"s[32]\", str)) return SendClientMessage(playerid, COLOR_WHITE, \"(( Használat: /getcar [rendszam] ))\");for(new i = 0; i < MAX_VEHICLES; i++) {if(strcmp(str, VehicleInfo[vRendszam], true) == 0) { new Float:x, Float:y, Float:z; GetPlayerPos(playerid, Float:x, Float:y, Float:z); return SetVehiclePos(i, Float:x, Float:y, Float:z);}}SendClientMessage(playerid, COLOR_WARNING, \"(( Nem található ilyen rendszámú jármû! ))\");return 1;}
CMD:getcar(playerid, params[]){new str[32];if(PlayerInfo[playerid] <= 2) return SendClientMessage(playerid, COLOR_WHITE, \"(( Ismeretlen parancs! ))\");if(sscanf(params, \"s[32]\", str)) return SendClientMessage(playerid, COLOR_WHITE, \"(( Használat: /getcar [rendszam] ))\");for(new i = 0; i < MAX_VEHICLES; i++) {if(strcmp(str, VehicleInfo[vRendszam], true) == 0) { new Float:x, Float:y, Float:z; GetPlayerPos(playerid, Float:x, Float:y, Float:z); SetVehiclePos(i, Float:x, Float:y, Float:z); break;}}SendClientMessage(playerid, COLOR_WARNING, \"(( Nem található ilyen rendszámú jármû! ))\");return 1;}