12.06.2014, 16:48
Quote:
well try use this tutorial and rep the guy who made it Tutorial
|
pawn Код:
public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
if(clickedid == MDC_TITLE_BAR_X)
{
CancelSelectTextDraw(playerid);
TextDrawHideForPlayer(playerid, MDC_MAIN_BACKGROUND);
TextDrawHideForPlayer(playerid, MDC_TITLE_BAR);
TextDrawHideForPlayer(playerid, MDC_TITLE_BAR_BACKGROUND);
TextDrawHideForPlayer(playerid, MDC_TITLE_BAR_X_BACKGROUND);
TextDrawHideForPlayer(playerid, MDC_WELCOME_MESSAGE);
TextDrawHideForPlayer(playerid, MDC_TITLE_BAR_X);
TextDrawHideForPlayer(playerid, MDC_BUTTON_TAKE_BREAK);
TextDrawHideForPlayer(playerid, MDC_BUTTON_REQUEST_SUPERVISOR);
TextDrawHideForPlayer(playerid, MDC_UNKOWN_BACKGROUND);
TextDrawHideForPlayer(playerid, MDC_BUTTON_ACTIVE_SUPERVISORS);
TextDrawHideForPlayer(playerid, MDC_BUTTON_ACTIVE_DEPUTIES);
TextDrawHideForPlayer(playerid, MDC_BUTTON_CLOCK_IN);
TextDrawHideForPlayer(playerid, MDC_BUTTON_CLOCK_OUT);
TextDrawHideForPlayer(playerid, MDC_BUTTON_EMPLOYEE_PROFILE);
TextDrawHideForPlayer(playerid, MDC_BUTTON_CITIZEN_DATABASE);
TextDrawHideForPlayer(playerid, MDC_BUTTON_VEHICLE_DATABASE);
TextDrawHideForPlayer(playerid, MDC_BUTTON_PLACE_BOLO);
TextDrawHideForPlayer(playerid, MDC_BUTTON_REQUEST_BACKUP);
TextDrawHideForPlayer(playerid, MDC_BUTTON_CANCEL_BACKUP);
TextDrawHideForPlayer(playerid, MDC_BUTTON_ISSUE_CITATION);
TextDrawHideForPlayer(playerid, MDC_BUTTON_REVOKE_LICENSE);
TextDrawHideForPlayer(playerid, MDC_BUTTON_REQUEST_TOW_UNIT);
TextDrawHideForPlayer(playerid, MDC_BUTTON_REQUEST_DELTA_UNIT);
TextDrawHideForPlayer(playerid, MDC_BUTTON_REQUEST_SIERRA);
TextDrawHideForPlayer(playerid, MDC_INFORMATION);
TextDrawHideForPlayer(playerid, MDC_INFORMATION_2);
TextDrawHideForPlayer(playerid, MDC_INFORMATION_3);
TextDrawHideForPlayer(playerid, MDC_INFORMATION_4);
TextDrawHideForPlayer(playerid, MDC_DEPARTMENTAL_NOTIFICATIONS);
TextDrawHideForPlayer(playerid, MDC_DEPARTMENT_NOTIFICATIONS_);
TextDrawHideForPlayer(playerid, MDC_BUTTON_ACTIVE_BOLOS);
TextDrawHideForPlayer(playerid, MDC_BUTTON_ACTIVE_ROBBERIES);
return 1;
}
if(clickedid == MDC_BUTTON_ACTIVE_SUPERVISORS)
{
new count, activesupervisors[512],dialog[256], Namez[MAX_PLAYER_NAME];
for(new i=0;i<=MAX_PLAYERS;i++)
{
if(PlayerInfo[i][pMember] == 1)
{
if(PlayerInfo[playerid][pRank] >= 5 && PlayerInfo[playerid][pRank] <= 7)
{
if(PlayerInfo[i][pOnDuty] == 1)
{
count++;
if(count >= 1)
{
GetPlayerName(i, Namez, MAX_PLAYER_NAME);
switch(PlayerInfo[i][pRank])
{
case 5:format(activesupervisors, sizeof(activesupervisors), "\nSergeant %s", Namez[playerid]);
case 6:format(activesupervisors, sizeof(activesupervisors), "\nLieutenant %s", Namez[playerid]);
case 7:format(activesupervisors, sizeof(activesupervisors), "\nCaptain %s", Namez[playerid]);
}
strcat(dialog,activesupervisors);
ShowPlayerDialog(playerid, DIALOG_ACTIVE_SUPERVISORS, DIALOG_STYLE_LIST, "Active Supervisors", dialog, "OK", "");
}
else
{
SendClientMessage(playerid, ERROR, "There are not any active supervisors!");
}
}
}
}
}
return 1;
}
return 1;
}