forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z);forward CheckForWalkingTeleport(playerid);
public PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z){ if(IsPlayerConnected(playerid)){new Float:tempposx, Float:tempposy, Float:tempposz;if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi))) return 1;}return 0;}public CheckForWalkingTeleport(playerid){if(PlayerToPoint(1, playerid,1554.2526,-1675.5461,16.1953)){SetPlayerInterior(playerid, 3);SetPlayerPos(playerid,238.2731,141.3458,1003.0234);SetPlayerFacingAngle(playerid,355.2865);}else if(PlayerToPoint(1, playerid,238.6994,138.6520,1003.0234)){SetPlayerInterior(playerid, 0);SetPlayerPos(playerid,1550.2590,-1675.4907,15.3281);SetPlayerFacingAngle(playerid,87.4074);}return 1;}
public OnPlayerUpdate(playerid){if(IsPlayerInRangeOfPoint(playerid, 1.0, 1554.2526,-1675.5461,16.1953)) // Én jobban szeretem ha 0.5 van az 1.0 helyett{ SetPlayerInterior(playerid, 3); SetPlayerPos(playerid,238.2731,141.3458,1003.0234); SetPlayerFacingAngle(playerid,355.2865);}if(IsPlayerInRangeOfPoint(playerid, 1.0, 238.6994,138.6520,1003.0234)) // Én jobban szeretem ha 0.5 van az 1.0 helyett{ SetPlayerInterior(playerid, 0); SetPlayerPos(playerid,1550.2590,-1675.4907,15.3281); SetPlayerFacingAngle(playerid,87.4074);}return 1;}
Így 100% hogy jó, nálam így van megoldva és egyszerûbb is mint a DT-s megoldás... :yucky: public OnPlayerUpdate(playerid){if(IsPlayerInRangeOfPoint(playerid, 1.0, 1554.2526,-1675.5461,16.1953)) // Én jobban szeretem ha 0.5 van az 1.0 helyett{ SetPlayerInterior(playerid, 3); SetPlayerPos(playerid,238.2731,141.3458,1003.0234); SetPlayerFacingAngle(playerid,355.2865);}if(IsPlayerInRangeOfPoint(playerid, 1.0, 238.6994,138.6520,1003.0234)) // Én jobban szeretem ha 0.5 van az 1.0 helyett{ SetPlayerInterior(playerid, 0); SetPlayerPos(playerid,1550.2590,-1675.4907,15.3281); SetPlayerFacingAngle(playerid,87.4074);}return 1;}
PlayerToPoint helyett már van IsPlayerInRangeOfPointaz 1.0-s range szerintem nagyon kevés.OnPlayerUpdate alatt laggoltatni fogja a szervert. [/quote]Figyelek rá, hogy szólsz