18.01.2015, 19:11
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:
Then at the bottom of your script, add the following function and edit with your own preferences:
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);
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;
}