09.06.2012, 20:40
Quem puder me ajudar da um help por favorrrr
O meu /ligarv e /desligarv nгo estб funcinando em alguns carros do GM, ele liga alguns carros....
O meu /ligarv e /desligarv nгo estб funcinando em alguns carros do GM, ele liga alguns carros....
PHP код:
CMD:ligarv (playerid)
{
new vid = GetPlayerVehicleID(playerid);
for(new y = 0; y < 49 ; y++)
{
if (vid==VPM[y]||vid==VPC[y]||vid==VHOSPITAL[y]||vid==VSK[y]||vid==VRACERS[y]||vid==VMECANICO[y]||vid==VAZTECAS[y]||vid==VTRIAD[y]||vid==VVAGOS[y]||vid==VHOTEL1[y]||vid==VAERO[y]||vid==VALQAEDA[y]||vid==VBOMBEIROS[y]||vid==VCAMINHONEIRO[y]||vid==VEXERCITO[y]||vid==VGROOVE[y]||vid==VREPORTER[y]||vid==VSEGURANCA[y]||vid==VTAXI[y]||vid==VHITMANS[y])
{
GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(vid,VEHICLE_PARAMS_ON,lights,alarm,doors,bonnet,boot,objective);
y++;
}
}
return 1;
}
CMD:desligarv (playerid)
{
new vid = GetPlayerVehicleID(playerid);
for(new y = 0; y < 50; y++)
{
if (IsPlayerInAnyVehicle(playerid))
{
if (vid==VPM[y]||vid==VPC[y]||vid==VHOSPITAL[y]||vid==VSK[y]||vid==VRACERS[y]||vid==VMECANICO[y]||vid==VAZTECAS[y]||vid==VTRIAD[y]||vid==VVAGOS[y]||vid==VHOTEL1[y]||vid==VAERO[y]||vid==VALQAEDA[y]||vid==VBOMBEIROS[y]||vid==VCAMINHONEIRO[y]||vid==VEXERCITO[y]||vid==VGROOVE[y]||vid==VREPORTER[y]||vid==VSEGURANCA[y]||vid==VTAXI[y]||vid==VHITMANS[y])
{
GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(vid,VEHICLE_PARAMS_OFF,lights,alarm,doors,bonnet,boot,objective);
}
}
}
return 1;
}
CMD:alugarv (playerid, cmdtext[])
{
new vid = GetPlayerVehicleID(playerid);
for(new y = 0; y < 30; y++)
{
if (vid == VALUGUEL[y])
{
GetPlayerMoney(playerid);
if (GetPlayerMoney(playerid) < 500)
{
GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(vid,VEHICLE_PARAMS_OFF,lights,alarm,doors,bonnet,boot,objective);
SendClientMessage(playerid, COR_ERRO, "Voce precisa de R$500,00 para alugar");
RemovePlayerFromVehicle(playerid);
}
else
{
GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(vid,VEHICLE_PARAMS_ON,lights,alarm,doors,bonnet,boot,objective);
GivePlayerMoney(playerid, -500);
SendClientMessage(playerid, COR_SUCESSO, "Carro alugado");
}
}
}
return 1;
}