engine command
#8

pawn Код:
enum pInfo
{
        Vehicle,
        VehicleModel
};
new PlayerInfo[MAX_PLAYERS];
// after loading player's stats
if(PlayerInfo[playerid][VehicleModel])
        PlayerInfo[playerid][Vehicle] = CreateVehicle(PlayerInfo[playerid][VehicleModel], x, y, z ...);
// command for turning the engine on/off
if(PlayerInfo[playerid][Vehicle] == GetPlayerVehicleID(playerid)) // if the player's vehicle id is equal to created vehicle
{
        SetVehicleParamsEx(....);
}
With that example player's saved vehicle model will be spawned when they join the server and you then you are saving the vehicle's ID so you can know if which vehicle is from which player. In this case you can change anything you want with vehicle's params.
Reply


Messages In This Thread
engine command - by Diti1 - 09.12.2014, 16:56
Re: engine command - by Clad - 09.12.2014, 18:25
Re: engine command - by Diti1 - 09.12.2014, 20:26
Re: engine command - by Diti1 - 10.12.2014, 05:27
Re: engine command - by BroZeus - 10.12.2014, 05:34
Re: engine command - by IndependentGaming - 10.12.2014, 06:42
Re: engine command - by Diti1 - 10.12.2014, 12:07
Re: engine command - by dominik523 - 10.12.2014, 12:36
Re: engine command - by Diti1 - 10.12.2014, 14:11

Forum Jump:


Users browsing this thread: 3 Guest(s)