Saving inside vehicle
#1

Hi! Is it possible to save inside the vehicle? If so, how? Thanks!
Reply
#2

just use the /save command.
you will find the saved coordinates in your gta sa user files/samp/savedpositions.txt
Reply
#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
#4

Hi guys, thank you for your replies, but What i mean, if I logout and i'm inside the vehicle, and when I log in back, I'm also inside the vehicle.
Reply
#5

Bump?
Reply
#6

according to my logic

First you have to have a variable that stores the current player in a vehicle
then when the player is logged in, he is the variable load, and input into car

for the function with itself you can use
PutPlayerInVehicle
explain PutPlayerInVehicle
wiki.sa-mp.com down in my country
Reply
#7

Quote:
Originally Posted by kloning1
Посмотреть сообщение
wiki.sa-mp.com down in my country
Just change https to http and it will be working.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)