16.02.2019, 09:53
i buy a baseball bat, how can i save?
Damn, I can remember when it was first released. I've learned a lot from this script mostly formatting my code right. Everyone appreciates a clean code in every programming language.
And yeah... Thanks for publishing it which was sadly caused by an unfortunate chain of events but at least people like me learned some stuff. Cheers. And yeah Emmet is the boss haha wonder if hes still coding. |
Exit_Nearest(playerid) { for (new i = 0; i != MAX_ENTRANCES; i ++) if (EntranceData[i][entranceExists] && IsPlayerInRangeOfPoint(playerid, 2.5, EntranceData[i][entranceInt][0], EntranceData[i][entranceInt][1], EntranceData[i][entranceInt][2])) { if (GetPlayerInterior(playerid) == EntranceData[i][entranceInterior] && GetPlayerVirtualWorld(playerid) == EntranceData[i][entranceWorld]) { return i; } } return -1; }
if ((id = Entrance_Inside(playerid)) != -1 && IsPlayerInRangeOfPoint(playerid, 2.5, EntranceData[id][entranceInt][0], EntranceData[id][entranceInt][1], EntranceData[id][entranceInt][2]))
if ((id = Exit_Nearest(playerid)) != -1 && IsPlayerInRangeOfPoint(playerid, 2.5, EntranceData[id][entranceInt][0], EntranceData[id][entranceInt][1], EntranceData[id][entranceInt][2])) { if (EntranceData[id][entranceCustom]) SetPlayerPosEx(playerid, EntranceData[id][entrancePos][0], EntranceData[id][entrancePos][1], EntranceData[id][entrancePos][2]); else SetPlayerPosEx(playerid, EntranceData[id][entrancePos][0], EntranceData[id][entrancePos][1], EntranceData[id][entrancePos][2]); SetPlayerFacingAngle(playerid, EntranceData[id][entrancePos][3] - 180.0); SetPlayerInterior(playerid, EntranceData[id][entranceExterior]); SetPlayerVirtualWorld(playerid, EntranceData[id][entranceExteriorVW]); SetCameraBehindPlayer(playerid); PlayerData[playerid][pEntrance] = Entrance_GetLink(playerid); return 1; }