07.06.2013, 17:56
Код:
#include a_samp /* //Copilar enum pInfo { pMembro, pLider } new PlayerInfo[MAX_PLAYERS][pInfo]; */ public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { if(newkeys == 16 && GetPlayerState(playerid) == PLAYER_STATE_ONFOOT) { if(IsPlayerInRangeOfPoint(playerid,1, 1327.2062, -877.5867, 39.5781)) { if(PlayerInfo[playerid][pMembro] == 1 || PlayerInfo[playerid][pLider] == 1) { TogglePlayerControllable(playerid, 0); ShowPlayerDialog(playerid, 12, DIALOG_STYLE_LIST, "Cofre", "{00FF1E}Dinheiro\n{2C221A}Materiais\n{00EBFF}Maconha\n{FF00B9}Cocaina\n{FF0005}Crack", "Confirmar", "Cancelar"); } } else if(IsPlayerInRangeOfPoint(playerid,1, 0, 0, 0)) { if(PlayerInfo[playerid][pMembro] == 2 || PlayerInfo[playerid][pLider] == 2) { TogglePlayerControllable(playerid, 0); ShowPlayerDialog(playerid, 12, DIALOG_STYLE_LIST, "Cofre", "{00FF1E}Dinheiro\n{2C221A}Materiais\n{00EBFF}Maconha\n{FF00B9}Cocaina\n{FF0005}Crack", "Confirmar", "Cancelar"); } } //USE: "else if" para add mais cofres, sempre antes do "else" abaixo. else { SendClientMessage(playerid, -1, "Vocк nгo й dessa organizaзгo!"); } } }