if(strcmp("/moteur", cmdtext, true) == 0) { if(IsPlayerInAnyVehicle(playerid)) { new vid = GetPlayerVehicleID(playerid); if(vid != INVALID_VEHICLE_ID) { GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective); if(engine == VEHICLE_PARAMS_ON) { GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective); SetVehicleParamsEx(vid,VEHICLE_PARAMS_OFF,lights,alarm,doors,bonnet,boot,objective); PlayerPlaySound(playerid, 1022, 0.0, 0.0, 0.0); GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~y~Le moteur se ~r~ferme..", 3000, 3); } if(engine == VEHICLE_PARAMS_OFF) { GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective); SetVehicleParamsEx(vid,VEHICLE_PARAMS_ON,lights,alarm,doors,bonnet,boot,objective); PlayerPlaySound(playerid, 1021, 0.0, 0.0, 0.0); GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~y~Le moteur ~g~s'allume..", 3000, 3); } } } return 1; }
if(!strcmp(cmdtext,"/moteur",true))
{
GetVehicleParamsEx(GetPlayerVehicleID(playerid),engine,lights,alarm,doors,bonnet,boot,objective);
if(engine == 1) SetVehicleParamsEx(GetPlayerVehicleID(playerid),0,lights,alarm,doors,bonnet,boot,objective);
if(engine == 0) SetVehicleParamsEx(GetPlayerVehicleID(playerid),1,lights,alarm,doors,bonnet,boot,objective);
return 1;
}
new engine,lights,alarm,doors,bonnet,boot,objective;
if(strcmp("/moteur", cmdtext, true) == 0)
{
if(IsPlayerInAnyVehicle(playerid))
{
new vid = GetPlayerVehicleID(playerid);
GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
if(engine == VEHICLE_PARAMS_ON)
{
SetVehicleParamsEx(vid,VEHICLE_PARAMS_OFF,lights,alarm,doors,bonnet,boot,objective);
PlayerPlaySound(playerid, 1022, 0.0, 0.0, 0.0);
GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~y~Le moteur se ~r~ferme..", 3000, 3);
}
else
{
SetVehicleParamsEx(vid,VEHICLE_PARAMS_ON,lights,alarm,doors,bonnet,boot,objective);
PlayerPlaySound(playerid, 1021, 0.0, 0.0, 0.0);
GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~y~Le moteur ~g~s'allume..", 3000, 3);
}
}
return 1;
}
pawn Code:
|