whats wrong?
#2

Try this:
pawn Код:
if(strcmp(cmdtext, "/lights",true) == 0){
if(IsPlayerInAnyVehicle(playerid)
if(Lights[playerid] == 0){
Lights[playerid] = 1;
new vid123 = GetPlayerVehicleID(playerid);
GetVehicleParamsEx(vid123,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(vid123,engine,VEHICLE_PARAMS_ON,alarm,doors,bonnet,boot,objective);
return 1;
}
if(Lights[playerid] == 1){
Lights[playerid] = 0;
GetVehicleParamsEx(vid123,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(vid123,engine,VEHICLE_PARAMS_OFF,alarm,doors,bonnet,boot,objective);
return 1;
}
}
Edit: Oh, I see you have the same problem for engines. Try this one for the engines:
pawn Код:
if(strcmp(cmdtext, "/engine",true) == 0) {
if(IsPlayerInAnyVehicle(playerid) {

if(Engine[playerid] == 0){
    Engine[playerid] =1;
    new vid = GetPlayerVehicleID(playerid);
    GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
    SetVehicleParamsEx(vid,VEHICLE_PARAMS_ON,lights,alarm,doors,bonnet,boot,objective);
            return 1;
}
if(Engine[playerid] == 1) {
{
    GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
    SetVehicleParamsEx(vid,VEHICLE_PARAMS_OFF,lights,alarm,doors,bonnet,boot,objective);
    Engine[playerid] =0;
             return 1;
    }
}
Reply


Messages In This Thread
whats wrong? - by -Rebel Son- - 08.12.2010, 21:25
Re: whats wrong? - by Biesmen - 08.12.2010, 21:33
Re: whats wrong? - by -Rebel Son- - 08.12.2010, 21:51

Forum Jump:


Users browsing this thread: 2 Guest(s)