Help with OnDialogResponse
#2

Hmm, i've added this and it complies perfect,
Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == Admincp)
    	{
        if(response)
        switch(listitem)
        {
            case 0:
        {
		if (pInfo[playerid][Adminlevel] < 1) return 0;
		for(new i;i<100;i++)
		SCMToAll(-1, " ");
		return 1;
     	}
      		case 1:
      	{
      	new str[300], str1[1000];
     	if (pInfo[playerid][Adminlevel] >= 1)
		{
		format(str, sizeof(str), "{FF0000}Moderator commands\n");
		strcat(str1, str);
		format(str, sizeof(str), "/a - Admin Chat\n");
		strcat(str1, str);
		format(str, sizeof(str), "/spec - Spectate a player\n");
		strcat(str1, str);
		format(str, sizeof(str), "/go - Teleport to a player\n");
		strcat(str1, str);
		format(str, sizeof(str), "/get - Teleport a player to you\n\n");
		strcat(str1, str);
		}
		if (pInfo[playerid][Adminlevel] >= 2)
		{
		format(str, sizeof(str), "Administrator commands\n");
		strcat(str1, str);
		format(str, sizeof(str), "/sethelper - set a player helper\n");
		strcat(str1, str);
		format(str, sizeof(str), "/vehicle - Give a player a vehicle\n");
		strcat(str1, str);
		format(str, sizeof(str), "/setname - Set a players name\n");
		strcat(str1, str);
		format(str, sizeof(str), "/repair - Repair vehicle\n");
		strcat(str1, str);
		format(str, sizeof(str), "/setpremium - set a player premium\n\n");
		strcat(str1, str);
		}
		if (pInfo[playerid][Adminlevel] >= 3)
		{
		format(str, sizeof(str), "Lead administrator commands\n");
		strcat(str1, str);
		format(str, sizeof(str), "/setadmin - set a player admin\n");
		strcat(str1, str);
		format(str, sizeof(str), "/restart - restart the server\n\n");
		strcat(str1, str);
		}
		if (pInfo[playerid][Adminlevel] >= 4)
		{
		format(str, sizeof(str), "LeXuZ & Jakwobs commands\n");
		strcat(str1, str);
		format(str, sizeof(str), "/what - what the fuck\n");
		strcat(str1, str);
		format(str, sizeof(str), "/die - kill \n");
		strcat(str1, str);
		}
		ShowPlayerDialog(playerid, Admincmd, DIALOG_STYLE_MSGBOX, "Admin commands", str1 ,"close","");
            	}
    		}
		}
	}
	return 1;
}
but when i am in game it does nothing, don't show the commands nor clear the chat, but it does pop up with the admincp dialog
Reply


Messages In This Thread
Help with OnDialogResponse - by LeXuZ - 23.11.2014, 11:59
Re: Help with OnDialogResponse - by LeXuZ - 23.11.2014, 12:48
Re: Help with OnDialogResponse - by UltraScripter - 23.11.2014, 12:50
Re: Help with OnDialogResponse - by LeXuZ - 23.11.2014, 12:53
Re: Help with OnDialogResponse - by UltraScripter - 23.11.2014, 12:57
Re: Help with OnDialogResponse - by LeXuZ - 23.11.2014, 12:59
Re: Help with OnDialogResponse - by UltraScripter - 23.11.2014, 13:03
Re: Help with OnDialogResponse - by biker122 - 23.11.2014, 13:13
Re: Help with OnDialogResponse - by LeXuZ - 23.11.2014, 13:21
Re: Help with OnDialogResponse - by Mic_H - 23.11.2014, 13:22

Forum Jump:


Users browsing this thread: 1 Guest(s)