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



Vehicle Keys - Farshid1994 - 23.06.2013

how can i add vehicle Keys ?
for example for police cars , i dont want normal people to enter it as Driver
how many Diffrent keys i can set ?
i'd gladly appretiate if you show me example for two Diffrent cars , i'll rep


Re: Vehicle Keys - Admigo - 23.06.2013

Quote:
Originally Posted by Farshid1994
Посмотреть сообщение
how can i add vehicle Keys ?
for example for police cars , i dont want normal people to enter it as Driver
how many Diffrent keys i can set ?
i'd gladly appretiate if you show me example for two Diffrent cars , i'll rep
You can use this: https://sampwiki.blast.hk/wiki/GetPlayerKeys
Here are all keys you can use: https://sampwiki.blast.hk/wiki/Keys


Re: Vehicle Keys - Farshid1994 - 23.06.2013

Quote:
Originally Posted by Admigo
Посмотреть сообщение
no not like Keyboard Keys...
i mean those keys in RolePlay Servers , when a normal player wants to enter a Police Vehicle it sends a client message " you dont have the keys of this vehicle "


Re: Vehicle Keys - Admigo - 23.06.2013

Sorry, my bad:P
I think you use teams?
Example:
Код:
if(gTeam[playerid]!=TEAM_COP)
{
    SendClientMessage(playerid,COLOR_RED,"You dont have the keys to use this vehicle");
    RemovePlayerFromVehicle(playerid,vehicleid);
    return 1;
}