CMD:kocsi(playerid, params[]){new string[128];if(isnull(params)){SendClientMessage(playerid, -1,\"========================================================================================\");SendClientMessage(playerid, -1,\"/kocsi [ajtó]\");SendClientMessage(playerid, -1,\"========================================================================================\");return 1;}if(!strcmp(params, \"ajtó\", true)){ for(new i = 1; i <= MAX_VEHICLES; i++) { new Float:vx, Float:vy, Float:vz, idx; idx = GetVehiclePos(i, vx, vy, vz); GetVehiclePos(i, vx, vy, vz); if(IsPlayerInRangeOfPoint(playerid, 3, vx, vy, vz)) { new engine,lights,alarm,doors,bonnet,boot,objective; GetVehicleParamsEx(idx,engine,lights,alarm,doors,bonnet,boot,objective); if(doors == 1) { SetVehicleParamsEx(idx,engine,lights,alarm,0,bonnet,boot,objective); SendClientMessage(playerid,-1,\"Ajtók nyitva!\"); }else{ SetVehicleParamsEx(idx,engine,lights,alarm,1,bonnet,boot,objective); SendClientMessage(playerid,-1,\"Ajtók zárva!\"); } }//else{SendClientMessage(playerid,-1,\"Nincs közeledben jármû!\");}}}return 1;}
#include a_samp#include sscanf2#include zcmdCMD:ajto(playerid, params[]) {new functions[16];if(sscanf(params, \"s[16]\", functions)) return SendClientMessage(playerid, -1, \"Használat: /ajto [nyit/zár]\");if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return SendClientMessage(playerid, 0xff0000ff, \"Hiba! Vezetned kell egy jármûvet!\");if(!strcmp(functions, \"nyit\")) {for(new i; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i) && i != playerid) SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid), i, 0, 0);SendClientMessage(playerid, 0x33aa33ff, \"Ajtók nyitva!\");}else if(!strcmp(functions, \"zár\")) {for(new i; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i) && i != playerid) SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid), i, 0, 1);SendClientMessage(playerid, 0x99aa99ff, \"Ajtók zárva!\");}else SendClientMessage(playerid, -1, \"Használat: /ajto [nyit/zár]\");return 1;}
CMD:kocsi(playerid, params[]){new functions[16];if(sscanf(params, \"s[16]\", functions)) return SendClientMessage(playerid, -1, \"Használat: /kocsi [ajtó]\");if(!strcmp(functions, \"ajtó\", true)){ for(new i = 1; i <= MAX_VEHICLES; i++) { new Float:vx, Float:vy, Float:vz, idx; //idx = GetVehiclePos(i, vx, vy, vz); GetVehiclePos(i, vx, vy, vz); if(IsPlayerInRangeOfPoint(playerid, 3, vx, vy, vz)) { new engine,lights,alarm,doors,bonnet,boot,objective; idx = GetPlayerVehicleID(playerid); GetVehicleParamsEx(i,engine,lights,alarm,doors,bonnet,boot,objective); if(doors == 1) { SetVehicleParamsEx(i,engine,lights,alarm,0,bonnet,boot,objective); SendClientMessage(playerid,-1,\"Ajtók nyitva!\"); }else{ SetVehicleParamsEx(i,engine,lights,alarm,1,bonnet,boot,objective); SendClientMessage(playerid,-1,\"Ajtók zárva!\"); } }//else{SendClientMessage(playerid,-1,\"Nincs közeledben jármû!\");}}}return 1;}