11.05.2010, 19:24
Код:
if ((newkeys & KEY_SECONDARY_ATTACK) && !(oldkeys & KEY_SECONDARY_ATTACK)) { for(new i = 0; i <MAX_HOUSES; i++) { if(PlayerToPoint(6, playerid, HouseInfo[i][hExitx], HouseInfo[i][hExity], HouseInfo[i][hExitz])) { new houseid = IsPlayerInHouse[playerid]; if(HouseInfo[houseid][hVec] == 508) { SetPlayerInterior(playerid, 0); SetPlayerVirtualWorld(playerid, 0); IsPlayerInHouse[playerid] = INVALID_HOUSE_ID; PutPlayerInVehicle(playerid, houseid+1, 0); RemovePlayerFromVehicle(playerid); return 1; } else { SetPlayerPos(playerid, HouseInfo[houseid][hEntrancex], HouseInfo[houseid][hEntrancey], HouseInfo[houseid][hEntrancez]); SetPlayerInterior(playerid, 0); SetPlayerVirtualWorld(playerid, 0); IsPlayerInHouse[playerid] = INVALID_HOUSE_ID; return 1; } } } for(new i = 0; i <MAX_BUSINESSES; i++) { if(PlayerToPoint(6, playerid, BusinessInfo[i][bExitx], BusinessInfo[i][bExity], BusinessInfo[i][bExitz])) { new playerworld = GetPlayerVirtualWorld(playerid); SetPlayerPos(playerid, BusinessInfo[playerworld-1][bEntrancex], BusinessInfo[playerworld-1][bEntrancey], BusinessInfo[playerworld-1][bEntrancez]); SetPlayerInterior(playerid, 0); SetPlayerVirtualWorld(playerid, 0); return 1; } } if(IsPlayerInAnyVehicle(playerid)) { RemovePlayerFromVehicleEx(playerid); TogglePlayerControllable(playerid, true); } return 1; }
BTW I copied it from /exit command and put the key statement in it so it might be that :O
How can I make it work?