SA-MP Forums Archive
help - 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: help (/showthread.php?tid=586203)



help - Karolukas123 - 20.08.2015

hey, can explain how make if door lock, but im 4 lvl admin it still open for my not for all players.


Re: help - rymax99 - 20.08.2015

What?


Re: help - Mariciuc223 - 20.08.2015

I think he want to know how to: @ make a car door to be locked for players , but unlocked for admins level 4

That's what i understand.

There we go buddy -> https://sampwiki.blast.hk/wiki/Function:...aramsForPlayer

Quote:

// sometime earlier:
SetVehicleParamsForPlayer(iPlayerVehicle, iPlayerID, 1, 0);

// sometime later when you want the vehicle to respawn:
new
iEngine, iLights, iAlarm,
iDoors, iBonnet, iBoot,
iObjective;

GetVehicleParamsEx(iPlayerVehicle, iEngine, iLights, iAlarm, iDoors, iBonnet, iBoot, iObjective);
SetVehicleParamsEx(iPlayerVehicle, iEngine, iLights, iAlarm, iDoors, iBonnet, iBoot, 0);

Wiki exemple.


Re: help - Karolukas123 - 20.08.2015

no no.. on server gates (object) a locked but i need to know how to make it working for admin


Re: help - Sjn - 20.08.2015

Well, make an openable get first. If you don't know how to, there are plenty of tutorials around.

Then check under the opening script if the player that is near the gate (or uses the cmd to open) has an admin level of 4, then open the gate. Example;

PHP код:
if (g_PlayerInfo[playerid][pAdminLevel] >= 4)
{
       
// Open the gate here