04.05.2012, 18:39
Tente:
pawn Код:
if(!strcmp(cmdtext,"/farol",true))
{
new mot, lu, alar, por, cap, porma, ob;
new carro = GetPlayerVehicleID(playerid);
if(GetPVarInt(playerid, "farol"))
{
{
if(luz[playerid] == 1)
{
GetVehicleParamsEx(carro, mot, lu, alar, por, cap, porma, ob);
SetVehicleParamsEx(carro, mot, VEHICLE_PARAMS_OFF, alar, por, cap, porma, ob);
luz[playerid] = 0;
SendClientMessage(playerid, 0xFFFFFFAA, "Farol {E31919}Desligado!");
}
}
}
}
SetPVarInt(playerid, "farol", false);
{
if(luz[playerid] == 0)
{
GetVehicleParamsEx(carro, mot, lu, alar, por, cap, porma, ob);
SetVehicleParamsEx(carro, mot, VEHICLE_PARAMS_ON, alar, por, cap, porma, ob);
luz[playerid] = 1;
SendClientMessage(playerid, 0xFFFFFFAA, "Farol {2F991A}Ligado!");
}
}
return 1;
}