/buylock , alarm lock and electrik aren't working. - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: /buylock , alarm lock and electrik aren't working. (
/showthread.php?tid=447007)
/buylock , alarm lock and electric lock aren't working. -
Mariooo - 28.06.2013
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
Re: /buylock , alarm lock and electrik aren't working. -
Mariooo - 28.06.2013
Anyone?