20.05.2011, 11:26
Mmmh...?
Please give me an example...
This is my Script, but don't work:
if(strcmp(cmd, "/OpenBon",true) == 0)
{
new AVEH = GetClosestVeh(MAX_VEHICLES);
// This Work
if(IsPlayerInAnyVehicle(playerid))
{
new vid = GetPlayerVehicleID(playerid);
if(vid != INVALID_VEHICLE_ID)
{
GetVehicleParamsEx(vid, Engine, Lights, Alarm, Doors, Bonnet, Boot, Objective);
SetVehicleParamsEx(vid, Engine, Lights, Alarm, Doors, ON, Boot, Objective);
}
}
// This DON'T Work
if(!IsPlayerInAnyVehicle(playerid))
{
if(AVEH != INVALID_VEHICLE_ID)
{
GetVehicleParamsEx(AUTO, Engine, Lights, Alarm, Doors, Bonnet, Boot, Objective);
SetVehicleParamsEx(AUTO, Engine, Lights, Alarm, Doors, ON, Boot, Objective);
}
}
return 1; }
Please give me an example...
This is my Script, but don't work:
if(strcmp(cmd, "/OpenBon",true) == 0)
{
new AVEH = GetClosestVeh(MAX_VEHICLES);
// This Work
if(IsPlayerInAnyVehicle(playerid))
{
new vid = GetPlayerVehicleID(playerid);
if(vid != INVALID_VEHICLE_ID)
{
GetVehicleParamsEx(vid, Engine, Lights, Alarm, Doors, Bonnet, Boot, Objective);
SetVehicleParamsEx(vid, Engine, Lights, Alarm, Doors, ON, Boot, Objective);
}
}
// This DON'T Work
if(!IsPlayerInAnyVehicle(playerid))
{
if(AVEH != INVALID_VEHICLE_ID)
{
GetVehicleParamsEx(AUTO, Engine, Lights, Alarm, Doors, Bonnet, Boot, Objective);
SetVehicleParamsEx(AUTO, Engine, Lights, Alarm, Doors, ON, Boot, Objective);
}
}
return 1; }