admincar restrict by vehicle color
#2

Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    new color1, color2;
    if(newstate == PLAYER_STATE_DRIVER)
	{
GetVehicleColor(GetPlayerVehicleID(playerid),color1,color2);// Should be Indented, but this sets color1 & color2
		if( color1==1 && color2==1 && SpielerInfo[playerid][pAdmin]<6 )
	    {
	             RemovePlayerFromVehicle(playerid);
	             SendClientMessage(playerid, red, "{FF0000}[SERVER] {FFFFFF}Only for Admin");
	    }
 	}
	return 1;
}
Kinda rushing this, but give this a shot, you must first store the colors of the car to color1 and color2 by using GetVehicleColor() and then check if those colors are black along with if the player is admin etc.
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: 1 Guest(s)