admincar restrict by vehicle color
#1

hey guys,
i will restrict my vehicles by vehicle color.
If the vehilce color1 and color2 is black, than only a admin can enter the vehicle. other play will be removed outiside.

my code:
Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    new color1, color2;
    color1 = 0;
    color2 = 0;
    if(newstate == PLAYER_STATE_DRIVER)
	{
		if(GetVehicleColor(GetPlayerVehicleID(playerid), color1, color2))
	    {
	         if(SpielerInfo[playerid][pAdmin] < 6)
	         {
	             RemovePlayerFromVehicle(playerid);
	             SendClientMessage(playerid, red, "{FF0000}[SERVER] {FFFFFF}Only for Admin");
	         }
	    }
 	}
	return 1;
}
but it will not work, it remove alle player form all vehicles abov admin lvl 6.. i will it only vor vehicles witch is black colored. i dont know how to code this.

i use this include: https://sampforum.blast.hk/showthread.php?tid=235398

hope for help
Reply


Messages In This Thread
admincar restrict by vehicle color - by s3rserii - 07.09.2012, 14:37
Re: admincar restrict by vehicle color - by XGh0stz - 07.09.2012, 15:09
AW: admincar restrict by vehicle color - by s3rserii - 07.09.2012, 15:21

Forum Jump:


Users browsing this thread: 5 Guest(s)