17.01.2013, 11:06
What's wrong ? It compiles without errors but doesn't work...
pawn Код:
if(strcmp("/lights", cmdtext, true, 10) == 0 || strcmp("/svetla", cmdtext, true, 10) == 0)
{
new vehicleid = GetPlayerVehicleID(playerid);
if(GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective))
{
if(lights == 0)
{
SetVehicleParamsEx(vehicleid, engine, 1, alarm, doors, bonnet, boot, objective);
return 1;
}
}
if(GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective))
{
if(lights == 1)
{
SetVehicleParamsEx(vehicleid, engine, 0, alarm, doors, bonnet, boot, objective);
return 1;
}
}
return 1;
}