Admin vehicle 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: Admin vehicle help (
/showthread.php?tid=423961)
Admin vehicle help -
[..MonTaNa..] - 20.03.2013
.....
Re: Admin vehicle help -
Kreatyve - 20.03.2013
Pretty sure there's an administrator system like this,
all you have to do is search.
Re: Admin vehicle help -
Xoomer - 20.03.2013
in romadmin and luxadmin system they have like /acar cmd which on only admins can use car
Re: Admin vehicle help -
Gamer_007 - 20.03.2013
Use DAdmin for it.It has the best feature of that.Here is link
https://sampforum.blast.hk/showthread.php?pid=2236609#pid2236609
Re: Admin vehicle help -
[ABK]Antonio - 20.03.2013
Here's one way you can do it
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_DRIVER && !pData[playerid][AdminLevel]) //replace admin level with your admin variable
{
new vehicle=GetPlayerVehicleID(playerid);
for(new i=0; i < MAX_PLAYERS; i++)
{
if(pData[i][AdminCar] == vehicle)
{
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid, 0xCC0000AA, "This is an admin car and you aren't an admin");
}
}
}
return 1;
}
Then you just do this inside of your car cmd
pawn Код:
pData[playerid][AdminCar] = CreateVehicle(stuffhere);
Of course, if you use foreach it would probably be more efficient
EDIT: lol, forgot the admin variable
Re: Admin vehicle help -
[..MonTaNa..] - 04.04.2013
Removed.
Re: Admin vehicle help -
[..MonTaNa..] - 06.04.2013
Removed.