09.01.2014, 10:57
Quote:
CMD:neon(playerid,params[]) { if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER) { ShowPlayerDialog(playerid, NEONMENU, DIALOG_STYLE_LIST, "Pick Neon Color", "Blue\nRed\nGreen\nWhite\nPink\nYellow\nPolice Strobe\nInterior Lights\nBack Neon\nFront neon\nUndercover Roof Light\nRemove All Neon", "Select", "Cancel"); } else SendClientMessage(playerid, 0x00FFFFAA, "You Are Not Inside Vehicle"); return 1; } |
If the player is a driver, he's also automatically inside a vehicle, so no need to check for both.
You cannot have a state as driver when you're not inside a vehicle.
This will suffice:
pawn Код:
CMD:neon(playerid,params[])
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
ShowPlayerDialog(playerid, NEONMENU, DIALOG_STYLE_LIST, "Pick Neon Color", "Blue\nRed\nGreen\nWhite\nPink\nYellow\nPolice Strobe\nInterior Lights\nBack Neon\nFront neon\nUndercover Roof Light\nRemove All Neon", "Select", "Cancel");
}
else SendClientMessage(playerid, 0x00FFFFAA, "You Are Not Inside Vehicle");
return 1;
}