CMD:respawncars(playerid,params[]){ #pragma unused params if(!IsPlayerAdminLevel(playerid, 3)) return 0; //Legalább 3 as szintû adminnak kell lenned ! SendClientMessage(playerid, COLOR_GREY, \"Jármûvek Respawnolva!\"); GameTextForAll(\"~n~~n~~n~~n~~n~~n~~r~Jarmuvek ~g~respawnolva Admin altal!\", 3000,3); for(new cars=0; cars<MAX_VEHICLES; cars++) { if(!VehicleOccupied(cars)) { SetVehicleToRespawn(cars); Tuning(); } } return 1;}
stock IsVehicleOccupied(vehicleid){ for(new i = 0; i < MAX_PLAYERS; i++){if(GetPlayerState(i) == PLAYER_STATE_DRIVER || GetPlayerState(i) == PLAYER_STATE_PASSENGER){ if(GetPlayerVehicleID(i) == vehicleid) { return 1; }}}return 0;}
C:\\Documents and Settings\\admin\\Asztal\\szerver\\gamemodes\\lvdm.pwn(2276) : warning 219: local variable \"text\" shadows a variable at a preceding levelC:\\Documents and Settings\\admin\\Asztal\\szerver\\gamemodes\\lvdm.pwn(2349) : error 001: expected token: \")\", but found \"{\"Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase 1 Error.
{
#include <a_samp>public OnPlayerCommandText(playerid, cmdtext[]){if(strcmp(cmdtext, \"/respawncars\", true) == 0){ SendClientMessage(playerid, 0xFFFFFFAA, \"Jármûvek újraspawnolva!\");for(new cars=0; cars<MAX_VEHICLES; cars++){ if(!VehicleOccupied(cars)) { SetVehicleToRespawn(cars); }}return 1;}return 0;}forward VehicleOccupied(vehicleid);public VehicleOccupied(vehicleid){for(new i=0;i<MAX_PLAYERS;i++){if(IsPlayerInVehicle(i,vehicleid)) return 1;}return 0;}
Azt hittem több hiba lesz, de csak egy hiba, amit nem tudom hol kell kijavítani :angry: C:\\Documents and Settings\\admin\\Asztal\\szerver\\gamemodes\\lvdm.pwn(2276) : warning 219: local variable \"text\" shadows a variable at a preceding levelC:\\Documents and Settings\\admin\\Asztal\\szerver\\gamemodes\\lvdm.pwn(2349) : error 001: expected token: \")\", but found \"{\"Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase 1 Error. Az a warning nem tudom mitõl van, ha arra is választ kapok kösz. Amúgy az említett sorban ez van: {