Saving inside vehicle
#3

You can use a command like this to see your coordinates in-game:
PHP код:
// Displays the current coordinates
COMMAND:loc(playeridparams[])
{
    
// Setup local variables
    
new Float:xFloat:yFloat:zFloat:ainteriorvirtualworldmsg[128];

    
// Get the interior and virtual world of the player
    
interior GetPlayerInterior(playerid);
    
virtualworld GetPlayerVirtualWorld(playerid);

    
// If the player is inside a vehicle
    
if (IsPlayerInAnyVehicle(playerid) == 1)
    {
        
// Get the location of the vehicle
        
GetVehiclePos(GetPlayerVehicleID(playerid), xyz);
        
GetVehicleZAngle(GetPlayerVehicleID(playerid), a);
        
format(msgsizeof(msg), "{00FF00}Your vehicle is at coordinates: {FFFF00}x = %0.3f, y = %0.3f, z = %0.3f, a = %0.3f"xyza);
    }
    else 
// The player is not in a vehicle
    
{
        
// Get the location of the player
        
GetPlayerPos(playeridxyz);
        
GetPlayerFacingAngle(playerida);
        
format(msgsizeof(msg), "{00FF00}You are at coordinates: {FFFF00}x = %0.3f, y = %0.3f, z = %0.3f, a = %0.3f"xyza);
    }

    
// Inform the player
    
SendClientMessage(playerid, -1msg);
    
format(msgsizeof(msg), "{00FF00}Interior: {FFFF00}%i{00FF00}, virtual world: {FFFF00}%i"interiorvirtualworld);
    
SendClientMessage(playerid, -1msg);

    
// Let the server know that this was a valid command
    
return 1;

Reply


Messages In This Thread
Saving inside vehicle - by eikzdej - 23.01.2017, 22:02
Re: Saving inside vehicle - by GangstaSunny. - 23.01.2017, 22:06
Re: Saving inside vehicle - by AmigaBlizzard - 23.01.2017, 22:24
Re: Saving inside vehicle - by eikzdej - 24.01.2017, 01:20
Re: Saving inside vehicle - by eikzdej - 24.01.2017, 21:22
Re: Saving inside vehicle - by kloning1 - 25.01.2017, 09:29
Re: Saving inside vehicle - by Rdx - 25.01.2017, 09:46

Forum Jump:


Users browsing this thread: 1 Guest(s)