with something small
#4

Alright, first of all, go ingame and go the the lowest point of your map and type /save
Open savedpositions.txt in your UserFiles folder and see what the z-coordinate is.

Now in your gamemode you'll have to start a timer with a for example 1 second interval, in the OnGameModeInit() callback:

pawn Код:
SetTimer("CheckHeight", 1000, 1);
Then at the bottom of your script, add the following function and edit with your own preferences:
pawn Код:
forward CheckHeight();
public CheckHeight()
{
    new Float:Z;
    for(new i; i<MAX_PLAYERS; i++)
    {
        if(!IsPlayerConnected(i)) continue;
        GetPlayerPos(i, Z, Z, Z);
        if(Z < LOWEST_COORDINATE)    // enter here the lowest z-coordinate
        {
            SetPlayerPos(i, -1622.7039,673.5800,-4.9063);
            SetPlayerFacingAngle(i, 150.9650);
        }
    }
    return 1;
}
Reply


Messages In This Thread
with something small - by leon44 - 18.01.2015, 18:23
Re: with something small - by Schneider - 18.01.2015, 18:53
Re: with something small - by leon44 - 18.01.2015, 18:57
Re: with something small - by Schneider - 18.01.2015, 19:11
Re: with something small - by leon44 - 18.01.2015, 20:54
Re: with something small - by Schneider - 18.01.2015, 20:56
Re: with something small - by leon44 - 18.01.2015, 21:16
Re: with something small - by Schneider - 18.01.2015, 21:20
Re: with something small - by leon44 - 18.01.2015, 23:22
Re: with something small - by Schneider - 18.01.2015, 23:36

Forum Jump:


Users browsing this thread: 3 Guest(s)