26.02.2008, 19:12
[V1.3]
You can put this function under OnGameModeInit, or you can use this function ingame.
Example:
Note: Positions you created ingame, won't get saved after server-restart!!!
RandomSpawnPlayer = This function will teleport a player to one of the postions created with AddSpawnPos.
You can put this function under OnPlayerSpawn
- AddSpawnPos(Float:X, Float:Y, Float:Z, Float:Angle, interior, virtualworld);
- RandomSpawnPlayer(playerid);
You can put this function under OnGameModeInit, or you can use this function ingame.
Example:
Код:
if(strcmp(cmd, "/savepos", true) == 0)
{
new Float:X, Float:Y, Float:Z, Float:A, interior, vw;
GetPlayerPos(playerid, X, Y, Z);
GetPlayerFacingAngle(playerid, A);
interior = GetPlayerInterior(playerid);
vw = GetPlayerVirtualWorld(playerid);
AddSpawnPos(X, Y, Z, A, interior, vw);
return 1;
}
RandomSpawnPlayer = This function will teleport a player to one of the postions created with AddSpawnPos.
You can put this function under OnPlayerSpawn

