06.05.2012, 00:15
pawn Код:
if(!strcmp(cmdtext,"/portamalas",true))
{
new mot, lu, alar, por, cap, porma, ob;
new carro = GetPlayerVehicleID(playerid);
if(carro != INVALID_VEHICLE_ID)
{
if(portamalas[playerid] == 0)
{
GetVehicleParamsEx(carro, mot, lu, alar, por, cap, porma, ob);
SetVehicleParamsEx(carro, mot, lu, alar, por, cap, VEHICLE_PARAMS_ON, ob);
portamalas[playerid] = 1;
SendClientMessage(playerid, 0xFFFFFFAA, "Porta-malas {2F991A}Aberto!");
}
}
}
else
{
new mot, lu, alar, por, cap, porma, ob;
new carro = GetPlayerVehicleID(playerid);
if(carro != INVALID_VEHICLE_ID)
{
if(portamalas[playerid] == 1)
{
GetVehicleParamsEx(carro, mot, lu, alar, por, cap, porma, ob);
SetVehicleParamsEx(carro, mot, lu, alar, por, cap, VEHICLE_PARAMS_OFF, ob);
portamalas[playerid] = 0;
SendClientMessage(playerid, 0xFFFFFFAA, "Porta-malas {E31919}Fechado!");
}
}
}
return 1;
}