24.07.2012, 04:31
How would i enter a place (garage) when i type /enter and when i /exit and can enter and exit with the car and have it change VW?
for(new idx=1; idx<MAX_GARAGES; idx++) // Dynamic Garages { if(IsPlayerInRangeOfPoint(playerid, 2, GarageInfo[idx][gX], GarageInfo[idx][gY], GarageInfo[idx][gZ])) { if(!GarageInfo[idx][gStatus] && PlayerInfo[playerid][pGarage] != idx && PlayerInfo[playerid][pVGarage] != idx) return SendClientMessage(playerid, COLOR_GREY, "This garage is locked."); format(string, sizeof(string), "* %s pushes the garage door button and enters the Garage.", RPN(playerid)); SendNearbyMessage(playerid, 15, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE); SetPlayerVirtualWorld(playerid, idx+500); if(GarageInfo[idx][gLevel] == 1) { SetPlayerPos(playerid, 290.74,2542.92,16.82); SetPlayerFacingAngle(playerid, 267.0980); SetCameraBehindPlayer(playerid); SetPlayerInterior(playerid, 0); } else if(GarageInfo[idx][gLevel] == 2) { SetPlayerPos(playerid, 366.77,2538.40,512.06); SetPlayerFacingAngle(playerid, 267.3974); SetCameraBehindPlayer(playerid); SetPlayerInterior(playerid, 0); } else if(GarageInfo[idx][gLevel] == 3) { SetPlayerPos(playerid, 404.98,2457.82,16.50); SetPlayerFacingAngle(playerid, 359.8550); SetCameraBehindPlayer(playerid); SetPlayerInterior(playerid, 0); } } }