Car Admin - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Car Admin (
/showthread.php?tid=224616)
Car Admin -
[nL]W0rfleR - 12.02.2011
Any way to make admin cars so only admins car enter the admin cars
Re: Car Admin -
XoX - 12.02.2011
Which adminscript you're using?
Re: Car Admin -
[nL]W0rfleR - 12.02.2011
LuxAdmin
Re: Car Admin -
XoX - 12.02.2011
Код:
#include <ladmin>
IsPlayerLuxAdmin(playerid);
or
IsPlayerLuxAdmin(playerid, level);
Re: Car Admin - Unknown123 - 12.02.2011
Somethin like:
pawn Код:
new AdminCar[5];
//Under OnGameModeInit
AdminCar[0] = AddStaticVehicleEx(...);
AdminCar[1] = AddStaticVehicleEx(...);
AdminCar[2] = AddStaticVehicleEx(...);
AdminCar[3] = AddStaticVehicleEx(...);
AdminCar[4] = AddStaticVehicleEx(...);
//.....
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_DRIVER && AdminCar[4])
{
if(!IsPlayerLuxAdmin(playerid, 1)) //Change it to what you want
{
SendClientMessage(playerid, 0xFF0000FF, "This vehicle is for admins ONLY!");
return 1;
}
else return 1;
}
return 1;
}
Re: Car Admin -
Mean - 12.02.2011
Quote:
Originally Posted by Unknown123
Somethin like:
pawn Код:
new AdminCar[5];
//Under OnGameModeInit AdminCar[0] = AddStaticVehicleEx(...); AdminCar[1] = AddStaticVehicleEx(...); AdminCar[2] = AddStaticVehicleEx(...); AdminCar[3] = AddStaticVehicleEx(...); AdminCar[4] = AddStaticVehicleEx(...);
//..... public OnPlayerStateChange(playerid, newstate, oldstate) { if(newstate == PLAYER_STATE_DRIVER && AdminCar[4]) { if(IsPlayerLuxAdmin(playerid, 1)) //Change it to what you want { SendClientMessage(playerid, 0xFF0000FF, "This vehicle is for admins ONLY!"); return 1; } else return 1; } return 1; }
|
This will stop the player from entering a vehicle IF HE IS AN ADMIN. Use something like :
pawn Код:
if(!IsPlayerLuxAdmin(playerid, 1))
I added a "!" which tells you it's negative.
Re: Car Admin - Unknown123 - 12.02.2011
Quote:
Originally Posted by Mean
This will stop the player from entering a vehicle IF HE IS AN ADMIN. Use something like :
pawn Код:
if(!IsPlayerLuxAdmin(playerid, 1))
I added a "!" which tells you it's negative.
|
ROFL i know that, but i made this fast so.. i just copyed and pasted the "IsPlayerLuxAdmin(playerid, 1)" from a other post here, LoL
EDIT: I edited my post