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?