/buylock , alarm lock and electrik aren't working.
#1

Hello people, I have one lock working. The industrial lock, that's the lock that will only lock the vehicle.

Now i can't make my other 2 locks working. The alarm lock has this under OnPlayerStateChange

Код:
else if(PlayerVehicleInfo[i][v][pvLocked] == 1 && PlayerVehicleInfo[i][v][pvLock] == 1) {
				    GetVehicleParamsEx(newcar,engine,lights,alarm,doors,bonnet,boot,objective);
					SetVehicleParamsEx(newcar,engine,lights,VEHICLE_PARAMS_ON,doors,bonnet,boot,objective);
					SetTimerEx("DisableVehicleAlarm", 20000, 0, "d",  newcar);
And my electric lock has this under OnPlayerStateChange

Код:
else if(PlayerVehicleInfo[i][v][pvLocked] == 1 && PlayerVehicleInfo[i][v][pvLock] == 3) {
					SetVehicleParamsEx(newcar,engine,lights,VEHICLE_PARAMS_ON,doors,bonnet,boot,objective);
    				GetPlayerPos(playerid, X, Y, Z);
		            SendAudioToRange(10300, 100, 0, X, Y, Z, 20.0);
		            SetPlayerPos(playerid, X + 1, Y, Z);
		            RemovePlayerFromVehicle(playerid);
		            new Float:slx, Float:sly, Float:slz;
					GetPlayerPos(playerid, slx, sly, slz);
					SetPlayerPos(playerid, slx, sly, slz);
					SetPVarInt(playerid, "IsFrozen", 1);
		            TogglePlayerControllable(playerid,0);
		            SetTimerEx("ReleasePlayer", 10000, 0, "d", playerid);
		            GameTextForPlayer(playerid,"~r~STUNNED!",11000,3);
		            GetPlayerHealth(playerid,HP);
		            SetPlayerHealth(playerid,HP-15);
I won't get errors but the code isn't working, if somebody enters my car and i bought an electric lock, the one who entered my car can drive it.

Hopefully you can help me!

Greetings,

Mario
Reply
#2

Anyone?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)