CMD:betesz(playerid, params[]){new Float: bX, Float: bY, Float: bZ;GetPlayerPos(id, bX, bY, bZ);if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,-1,\"Nem ülsz kocsiba!\");if(IsPlayerInRangeOfPoint(playerid, 10, bX, bY, bZ)){new vehicleid;vehicleid = GetPlayerVehicleID(playerid);PutPlayerInVehicle(id, vehicleid, 1);SendClientMessage(playerid, -1, \"Betettél valakit a kocsiba.\");SendClientMessage(id, -1, \"Valaki betett a kocsijába!\");}else SendClientMessage(playerid, -1, \"Nincs senki a közeledben!\");return 1;}
CMD:berant(playerid, params[]){new hely;new Float:ox, Float:oy, Float:oz;new giveplayerid;if(sscanf(params, \"ui\", giveplayerid, hely)) return SendClientMessage(playerid, -1, \"Használat: /berant [id] [ülés]\");{GetPlayerPos(giveplayerid, ox, oy, oz);if(IsPlayerInRangeOfPoint(playerid, 5.0, ox, oy, oz)){if(IsPlayerInAnyVehicle(playerid)){if(hely >= 1 && hely <=3){PutPlayerInVehicle(giveplayerid, GetPlayerVehicleID(playerid), hely);SendClientMessage(playerid, -1, \"Betetted a kocsidba!\");SendClientMessage(giveplayerid, -1, \"Berántott valaki a kocsijába!\");}else{SendClientMessage(playerid, -1, \"Nem megfelelõ hely!\");}}else{SendClientMessage(playerid, -1, \"Nem vagy kocsiban!\");}}else{SendClientMessage(playerid, -1, \"Nincs a közeledben!\");}}return 1;}
CMD:berant(playerid, params[]){new hely;new Float:ox, Float:oy, Float:oz;new giveplayerid;if(sscanf(params, \"ui\", giveplayerid, hely) return SendClientMessage(playerid, -1, \"Használat: /berant [id] [ülés]{GetPlayerPos(giveplayerid, ox, oy, oz);if(IsPlayerInRangeOfPoint(playerid, 5.0, ox, oy, oz)){if(IsPlayerInAnyVehicle(playerid)){if(hely >= 1 && hely <=3){PutPlayerInVehicle(giveplayerid, GetPlayerVehicleID(playerid), hely);SendClientMessage(playerid, -1, \"Betetted a kocsidba!\");SendClientMessage(giveplayerid, -1, \"Berántott valaki a kocsijába!\");}else{SendClientMessage(playerid, -1, \"Nem megfelelõ hely!\");}}else{SendClientMessage(playerid, -1, \"Nem vagy kocsiban!\");}}else{SendClientMessage(playerid, -1, \"Nincs a közeledben!\");}}return 1;} Nem otthonról írok, de ez tuti jó lesz Kell hozzá a sscanf [/quote]Köszi Alakul de még mindig van egy ilyen error: (80) : error 001: expected token: \")\", but found \"return\"(80) : error 037: invalid string (possibly non-terminated string)(80) : error 017: undefined symbol \"Haszn\"(80) : fatal error 107: too many error messages on one line Amiket kitudtam javítani az után már csak ezt írja: (80) : error 001: expected token: \")\", but found \"return\"
CMD:berant(playerid, params[]){new hely;new Float:ox, Float:oy, Float:oz;new giveplayerid;if(sscanf(params, \"ui\", giveplayerid, hely) return SendClientMessage(playerid, -1, \"Használat: /berant [id] [ülés]{GetPlayerPos(giveplayerid, ox, oy, oz);if(IsPlayerInRangeOfPoint(playerid, 5.0, ox, oy, oz)){if(IsPlayerInAnyVehicle(playerid)){if(hely >= 1 && hely <=3){PutPlayerInVehicle(giveplayerid, GetPlayerVehicleID(playerid), hely);SendClientMessage(playerid, -1, \"Betetted a kocsidba!\");SendClientMessage(giveplayerid, -1, \"Berántott valaki a kocsijába!\");}else{SendClientMessage(playerid, -1, \"Nem megfelelõ hely!\");}}else{SendClientMessage(playerid, -1, \"Nem vagy kocsiban!\");}}else{SendClientMessage(playerid, -1, \"Nincs a közeledben!\");}}return 1;}
(80) : error 001: expected token: \")\", but found \"return\"(80) : error 037: invalid string (possibly non-terminated string)(80) : error 017: undefined symbol \"Haszn\"(80) : fatal error 107: too many error messages on one line
(80) : error 001: expected token: \")\", but found \"return\"
if(IsPlayerInAnyVehicle(playerid)){ //ide akármi}else SendClientMessage(playerid,-1,\"Blablabla\");
CMD:berant(playerid, params[]){new hely;new Float:ox, Float:oy, Float:oz;new giveplayerid;if(sscanf(params, \"ui\", giveplayerid, hely)) return SendClientMessage(playerid, -1, \"Használat: /berant [id] [ülés]\");GetPlayerPos(giveplayerid, ox, oy, oz);if(IsPlayerInRangeOfPoint(playerid, 5.0, ox, oy, oz)){ if(IsPlayerInAnyVehicle(playerid)) { if(hely >= 1 && hely <=3) { PutPlayerInVehicle(giveplayerid, GetPlayerVehicleID(playerid), hely); SendClientMessage(playerid, -1, \"Betetted a kocsidba!\"); SendClientMessage(giveplayerid, -1, \"Berántott valaki a kocsijába!\"); }else SendClientMessage(playerid, -1, \"Nem megfelelõ hely!\"); }else SendClientMessage(playerid, -1, \"Nem vagy kocsiban!\");}else SendClientMessage(playerid, -1, \"Nincs a közeledben!\");return 1;}
De visszatérve a kérdésre, ittvan hibátlanul:CMD:berant(playerid, params[]){new hely;new Float:ox, Float:oy, Float:oz;new giveplayerid;if(sscanf(params, \"ui\", giveplayerid, hely)) return SendClientMessage(playerid, -1, \"Használat: /berant [id] [ülés]\");GetPlayerPos(giveplayerid, ox, oy, oz);if(IsPlayerInRangeOfPoint(playerid, 5.0, ox, oy, oz)){ if(IsPlayerInAnyVehicle(playerid)) { if(hely >= 1 && hely <=3) { PutPlayerInVehicle(giveplayerid, GetPlayerVehicleID(playerid), hely); SendClientMessage(playerid, -1, \"Betetted a kocsidba!\"); SendClientMessage(giveplayerid, -1, \"Berántott valaki a kocsijába!\"); }else SendClientMessage(playerid, -1, \"Nem megfelelõ hely!\"); }else SendClientMessage(playerid, -1, \"Nem vagy kocsiban!\");}else SendClientMessage(playerid, -1, \"Nincs a közeledben!\");return 1;} [/quote]Kösz fõnök :DDD tökéletesen mûködik