26.02.2015, 10:37
PHP код:
if(!IsPlayerInAnyVehicle(playerid))
{
SendClientMessage(playerid, Azul,"Vocк nгo estб em um veнculo");
return 1;
}
new mot, lu, alar, por, cap, porma, ob;
new carro = GetPlayerVehicleID(playerid);
if(carro != INVALID_VEHICLE_ID)
{
if(ligarv[playerid] == 0)
{
GetVehicleParamsEx(carro, mot, lu, alar, por, cap, porma, ob);
SetVehicleParamsEx(carro, VEHICLE_PARAMS_ON, lu, alar, por, cap, porma, ob);
ligarv[playerid] = 1;
SendClientMessage(playerid, Verde, "Ligado");
}
else
{
GetVehicleParamsEx(carro, mot, lu, alar, por, cap, porma, ob);
SetVehicleParamsEx(carro, VEHICLE_PARAMS_OFF, lu, alar, por, cap, porma, ob);
ligarv[playerid] = 0;
SendClientMessage(playerid, Vermelho, "Desligado!");
}
}