16.09.2013, 15:03
Hey, I got a vehicle lock command that works fine but when I get the message locked/unlocked I also get Server unknown command message, I tried replacing return 0; with return 1; but then the command didn't work like it should.
pawn Код:
if(strcmp(VehicleOwner[id], playername, true) == 0)
{
if(doors == 1)
{
doors = 0;
VehicleLock[id] = 0;
SendClientMessage(playerid, COLOR_GREEN, "Unlocked.");
}
else
{
doors = 1;
VehicleLock[id] = 1;
SendClientMessage(playerid, COLOR_RED, "Locked.");
}
SetVehicleParamsEx(id, engine, lights, alarm, doors, bonnet, boot, objective);
SaveVehicle(id);
return 0;
}
return 1;
}