SA-MP Forums Archive
Make a little bit higher in Spawn - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Make a little bit higher in Spawn (/showthread.php?tid=359716)



Make a little bit higher in Spawn - kbalor - 15.07.2012

Well, i have a problem with this Spawn thing. After spawning i always get stock in a Pad Spawner where people do actually spawn. Because of lag or streamer loads to long(It happens randomly, not everytime)

To solve this and to prevent if ever happens again, I just want to Spawn a little bit higher than normal. Anyone??


Re: Make a little bit higher in Spawn - cosbraa - 15.07.2012

Edit the spawn Z pos in your spawn file.
Or if you have a command to set spawn pos, make it GetPlayerPos(playerid, x, y, z+2);


Re: Make a little bit higher in Spawn - Captain_Mani - 15.07.2012

If this was your skin (spawn point)

AddPlayerClass(124,197.2842,170.1318,1003.0234,355.4306,0,0,0,0,0,0);

Make the numbers after the 3rd comma high.
The Numbers after the third comma in my AddPlayerClass is 1003.0234 .
Just make that part high.


Re: Make a little bit higher in Spawn - ReneG - 15.07.2012

Facing north in-game.

X Axis: Negative to Positive values = West to East
Y Axis: Negative to Positive values = South to North
Z Axis: Height


Re: Make a little bit higher in Spawn - kbalor - 15.07.2012

Quote:
Originally Posted by cosbraa
Посмотреть сообщение
Edit the spawn Z pos in your spawn file.
Or if you have a command to set spawn pos, make it GetPlayerPos(playerid, x, y, z+2);
I don't have GetPlayerPos on my script.

This is what i have in spawn.
Код:
new Float:RandomSpawns[][] =
{
    {1559.2078,1322.7371,13.2701}, // Randomspawn lva //
    {380.9417,2544.7393,19.0013}, // Randomspawn aa
    {-1526.9530,-84.3569,16.5564}, // Randomspawn sfa //
    {2076.1628,-2625.0005,15.9424}, // randomspawn lsa //
    {-2314.0161,-1628.3881,486.0627}, // randomspawn mc //
    (-2227.0630,2326.6521,7.5469) //Randomspawn bayside //
};
Sample:

Код:
CMD:lva(playerid, params[])
{
   if(gCommandsDisabled[playerid]==true)
   {
   ShowPlayerDialog(playerid, DIALOG_EVADE, DIALOG_STYLE_MSGBOX, "Leave Menu", "Please click Leave if you want to Exit and Cancel to close dialog", "Leave", "Cancel");
   return 1;
   }
   if(!IsPlayerInAnyVehicle(playerid)){
       SetPlayerPos(playerid, 1559.2078,1322.7371,13.2701);
       SetPlayerFacingAngle(playerid, 0.0);
       new string[128], pName[MAX_PLAYER_NAME];
       GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
       format(string, sizeof(string), "{6666FF}(/lva) {00CCFF}%s {6666FF}has Teleported to Las Venturas Airport",pName);
       SendClientMessageToAll(playerid, string);
       SetPlayerInterior(playerid, 0);
       SetPlayerVirtualWorld(playerid, 0);
   }
   else{
       new veh = GetPlayerVehicleID(playerid);
       SetVehiclePos(veh, 1559.2078,1322.7371,13.2701);
       
	   
	   new string[128], pName[MAX_PLAYER_NAME];
       GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
	   format(string, sizeof(string), "{6666FF}(/lva) {00CCFF}%s {6666FF}has Teleported to Las Venturas Airport",pName);
    
       SetVehicleZAngle(veh, 0.0);
       SendClientMessageToAll(playerid, string);
       LinkVehicleToInterior(veh, 0);
       SetVehicleVirtualWorld(veh, 0);
       PutPlayerInVehicle(playerid, veh, 0);
   }
   return SendClientMessage(playerid, 0xFF0000FF, "You have been teleported to Las Venturas Airport!");
}
EDIT: in RandomSpawns let say {1559.2078,1322.7371,13.2701}, // Randomspawn lva // Ill change the Highlighted to something higher?


Re: Make a little bit higher in Spawn - kbalor - 15.07.2012

All is well, but I need to change all Height in every spawn point +rep to you both!