10.11.2012, 18:22
Tipo eu digito o comando e sу fala Veiculo ligado com sucesso ele nao desliga
pawn Код:
if (strcmp("/motor", cmdtext, true, 10) == 0)
{
new carro = GetPlayerVehicleID(playerid);
if(carro != INVALID_VEHICLE_ID)
{
if(Engine[playerid] == 0)
{
new Vehicle = GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective;
GetVehicleParamsEx(Vehicle, engine, lights, alarm, doors, bonnet, boot, objective);
Engine[Vehicle] = 1, SetVehicleParamsEx(Vehicle, 1, lights, alarm, doors, bonnet, boot, objective);
SendClientMessage(playerid, COLOR_GREEN, "Veiculo ligado com sucesso.");
}
else if(Engine[playerid] == 1)
{
new Vehicle = GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective;
GetVehicleParamsEx(Vehicle, engine, lights, alarm, doors, bonnet, boot, objective);
SendClientMessage(playerid, COLOR_GREEN, "Motor desligado com sucesso.");
Engine[Vehicle] = 0, SetVehicleParamsEx(Vehicle, 0, lights, alarm, doors, bonnet, boot, objective);
}
}
}