08.06.2012, 15:50
Hello
How would i be able to make group vehicles turn on and off by typing /engine i am really stuck can i have some help please
Here is the code
Please how can i make it so group vehicles and be turned on and off
Thank You
Help Is Appreciated
How would i be able to make group vehicles turn on and off by typing /engine i am really stuck can i have some help please
Here is the code
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_DRIVER && oldstate == PLAYER_STATE_ONFOOT)
{
new PlayerVehicle = GetVehicleFileID(GetPlayerVehicleID(playerid));
new veh = GetPlayerVehicleID(playerid);
if(Vehicles[PlayerVehicle][CarGroup] >= 0 && Vehicles[PlayerVehicle][CarGroup] == Player[playerid][Group])
{
new vehicleid, engine, lights, alarm, doors, bonnet, boot, objective;
vehicleid = GetPlayerVehicleID( playerid );
GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
SetVehicleParamsEx(vehicleid, 1, lights, alarm, doors, bonnet, boot, objective);
}
}
}
Thank You
Help Is Appreciated