enum doorEnum {d_id, Float: d_x,Float: d_y,Float: d_z,Float: d_ix,Float: d_iy,Float: d_iz}new dInfo[][doorEnum] = {{5020,100.0000000,-164.9000000,3.3000000, 100.0000000,-164.9000000,-1.0000000} //Ezek a kordináták id, alap helyzet, nyitási helyzet};public OnGameModeInit(){for(new i=0; i<sizeof(dInfo); i++){ CreateObject(dInfo[d_id] ,dInfo[d_x], dInfo[d_y], dInfo[d_z], 0.0000000,0.0000000,0.0000000); // itt hozom létre az objectet}}CMD:nyit(playerid, params[]){for(new i=0; i<sizeof(dInfo); i++){ if(IsPlayerInRangeOfPoint(playerid, 2, dInfo[d_x], dInfo[d_y], dInfo[d_z])) { MoveObject(dInfo[d_id], dInfo[d_ix], dInfo[d_iy], dInfo[d_iz], 2); } else { SendClientMessage(playerid, COLOR_WARNING, \"Nem vagy kinyítható ajtó elõtt!\"); }}return 1;} // itt a parancs
CMD:nyit(playerid, params[]){new bool:c;for(new i=0; i<sizeof(dInfo); i++){ if(IsPlayerInRangeOfPoint(playerid, 2, dInfo[d_x], dInfo[d_y], dInfo[d_z])) { MoveObject(dInfo[d_id], dInfo[d_ix], dInfo[d_iy], dInfo[d_iz], 2); c = true; }}if(c==false) return SendClientMessage(playerid, COLOR_WARNING, \"Nem vagy kinyitható ajtó elõtt!\");return 1;}