07.09.2012, 14:37
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:
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
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; }
i use this include: https://sampforum.blast.hk/showthread.php?tid=235398
hope for help