08.02.2012, 18:18
Help if i put this then play can stay in vehicle and turn wheels left right can someone help me..with it.
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/engine", true))
{
new
veh = GetPlayerVehicleID(playerid);
if(veh != 0 && GetPlayerVehicleSeat(playerid) == 0)
{
new
engine,
lights,
alarm,
doors,
bonnet,
boot,
objective;
GetVehicleParamsEx(veh, engine, lights, alarm, doors, bonnet, boot, objective);
SetVehicleParamsEx(veh, !engine, lights, alarm, doors, bonnet, boot, objective);
}
return true;
}
return false;
}
Simply make use of Get/SetVehicleParamsEx as such:
pawn Код:
|
where do i make a sendclientmessage"Engine on"Engine off"??in this cmd
|
SendClientMessage(playerid, -1, ((engine) ? ("Vehicle turned OFF") : ("Vehicle turned ON")));
if(strcmp(cmd, "/engine", true) == 0) { new veh = GetPlayerVehicleID(playerid); if(veh != 0 && GetPlayerVehicleSeat(playerid) == 0) { new engine, lights, alarm, doors, bonnet, boot, objective; GetVehicleParamsEx(veh, engine, lights, alarm, doors, bonnet, boot, objective); SetVehicleParamsEx(veh, !engine, lights, alarm, doors, bonnet, boot, objective); } return true; }