08.12.2010, 09:56
Hi guys I make this cmd but its not turn off engine what wrong or how to do this function..
pawn Код:
CMD:engine(playerid,params[])
{
#pragma unused params
if(IsPlayerConnected(playerid))
{
if(GetPlayerState(playerid) == 2)
{
new veh = GetPlayerVehicleID(playerid),engine,lights,alarm,doors,bonnet,boot,objective;
GetVehicleParamsEx(veh,engine,lights,alarm,doors,bonnet,boot,objective);
if(VehicleInfo[veh][vEngine] == 0)
{
SetVehicleParamsEx(veh,VEHICLE_PARAMS_ON,lights,alarm,doors,bonnet,boot,objective);
SendClientMessage(playerid,GROVE,"Vehicle Engine OFF.");
VehicleInfo[veh][vEngine] = 1; }
else {
SetVehicleParamsEx(veh,VEHICLE_PARAMS_OFF,lights,alarm,doors,bonnet,boot,objective);
SendClientMessage(playerid,GROVE,"Vehicle Engine ON.");
VehicleInfo[veh][vEngine] = 0;
}
}
}
return 1;
}