Saving Vehicle Position
#1

Hello,

I need help with this.

my server dont save car position automatically.

you have to be in your vehicle and type /estacionar (/Park)

what i want is that when the player disconnect. saves all of the players cars position with out being in each car.

this is that command

PHP код:
CMD:estacionar(playeridparams[])
{
for(new 
MAX_PLAYERVEHICLESd++)
    {
        if(
IsPlayerInVehicle(playeridPlayerVehicleInfo[playerid][d][pvId]))
        {
            if(
GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return SendClientMessageEx(playeridCOLOR_GREY"Tu debes ser el conductor.");
            new 
Float:xFloat:yFloat:zFloat:angleFloat:health;
            
GetVehicleHealth(PlayerVehicleInfo[playerid][d][pvId], health);
            
PlayerVehicleInfo[playerid][d][pvHealth] = health;
            if(
health 800) return SendClientMessageEx(playeridCOLOR_GREY" Tu vehiculo estб muy daсado para estacionarlo.");
            if(
Info[playerid][pLockCar] == GetPlayerVehicleID(playerid)) Info[playerid][pLockCar] = INVALID_VEHICLE_ID;
            
GetVehiclePos(PlayerVehicleInfo[playerid][d][pvId], xyz);
            
GetVehicleZAngle(PlayerVehicleInfo[playerid][d][pvId], angle);
            
SurfingCheck(GetPlayerVehicleID(playerid));
            
UpdatePlayerVehicleParkPosition(playeriddxyzanglehealth);
            
PutPlayerInVehicle(playeridPlayerVehicleInfo[playerid][d][pvId], 0);
            
SetPlayerArmedWeapon(playerid0);
            new 
string[30 + (MAX_PLAYER_NAME 2)];
            
format(stringsizeof(string), "%s estaciona su vehнculo."GetPlayerNameEx(playerid));
            
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            
fVehSpeed[playerid] = 0.0;
            return 
1;
        }
    }
    
SendClientMessageEx(playeridCOLOR_GREY"Tu necesitas estar dentro de tu vehiculo para hacer esto.");
    return 
1;

Reply


Messages In This Thread
Saving Vehicle Position - by yancarlos4500 - 03.11.2013, 18:45
Re: Saving Vehicle Position - by Gogorakis - 03.11.2013, 18:56
Re: Saving Vehicle Position - by yancarlos4500 - 03.11.2013, 19:00
Re: Saving Vehicle Position - by CJay9209 - 03.11.2013, 19:16
Re: Saving Vehicle Position - by yancarlos4500 - 03.11.2013, 19:43
Re: Saving Vehicle Position - by [ABK]Antonio - 03.11.2013, 20:01
Re: Saving Vehicle Position - by yancarlos4500 - 03.11.2013, 20:16
Re: Saving Vehicle Position - by yancarlos4500 - 03.11.2013, 20:26

Forum Jump:


Users browsing this thread: 1 Guest(s)