CMD:en(playerid, params[])
{
new vehicleid = GetPlayerVehicleID(playerid);
new engine,lights,alarm,doors,bonnet,boot,objective;
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective);
if(engine == 0)
{
SetVehicleParamsEx(vehicleid,1,lights,alarm,doors,bonnet,boot,objective);
new str[128];
format(str, sizeof(str), "* %s twists the key in the ignition, turning the engine [ON]. *", GetName(playerid));
SendRangeMessage(playerid, COLOR_DO, str, 15);
return 1;
}
else if(engine == 1)
{
SetVehicleParamsEx(vehicleid,0,lights,alarm,doors,bonnet,boot,objective);
new str[128];
format(str, sizeof(str), "* %s twists the key in the ignition, turning the engine [OFF]. *", GetName(playerid));
SendRangeMessage(playerid, COLOR_DO, str, 15);
return 1;
}
}
return 1;
}
pawn Код:
|
I have allready tried this and when I re tried it, it returned nothing for the vehicles. I could not turn on any vehicles engine, therefore all vehicles were un-moveable. I have these definitions to, I will show you my entire cmd + defines
pawn Код:
|