Jump to content

Recommended Posts

Posted

Salut imi poate spune cineva sau imi arata un exemplu:

 Cum sa fac asa comanda dialog 

Care sa fie ca un tabel care poti apasa pe un rînd ca de ex ca sa se puna o anumita comanda 

Mai pe scurt un meniu 

Sper sa ma ajutati

Posted
if (strcmp("/comanda", cmdtext, true, 10) == 0)
	{
	ShowPlayerDialog(playerid, DIALOG_COMANDA, DIALOG_STYLE_LIST, "Comanda Selection", "Comanda #1\nComanda #2\nComanda #3\nComanda #4", "Ok", "Close");
 	return 1;
	}
	
// In loc de /comanda scri ce vrei tu.
// La DIALOG_COMANDA pui ce vrei tu ca dialog.
// Nu uita de #definde DIALOG_COMANDA (1) - sau ce numar vrei tu in paranteze.
// La Comanda Selection scri ce vrei tu.
// La Comanda #1,2,3,4 scri obiectele pe care le vrei. Eu ti-am dat un Exemplu.
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
	if(dialogid == DIALOG_COMANDA)
    {
        if(response)
        {
            switch(listitem)
            {
            		case 0:
            		{
// Aici introduci ce vrei tu. Exemplu: eu o sa pun un teleport + skin.
            			SetPlayerPos(playerid, 371.1013, -2025.1766, 7.6719);
            			SetPlayerSkin(playerid, 35);
            			SendClientMessage(playerid, 0xffff, "Comanda #1");
            		}
            	    case 1:
            		{
// Aici introduci ce vrei tu. Exemplu: eu o sa pun un teleport + skin.
            			SetPlayerPos(playerid, 1546.0457, -1675.5641, 13.5615);
            			GivePlayerWeapon(playerid, 24, 600);
            			SetPlayerSkin(playerid, 266);
            			SendClientMessage(playerid, 0xfffff, "Comanda #2");
            		}
            	    case 2:
            		{
// Aici introduci ce vrei tu. Exemplu: eu o sa pun un teleport + skin.
            			SetPlayerPos(playerid, 914, -1038, 31);
            			GivePlayerWeapon(playerid, 6, 1);
            			SetPlayerSkin(playerid, 268);
            			SendClientMessage(playerid, 0xffffff, "Comanda #3");
            		}
					case 3:
					{
// Aici introduci ce vrei tu. Exemplu: eu o sa pun un teleport + skin.
  			            SetPlayerPos(playerid, 914, -1038, 31);
            			SetPlayerSkin(playerid, 228);
            			SendClientMessage(playerid, 0xffffff, "Comanda #4");
					}
            }
        }
        return 1;
    }
	return 0;
}

Sper ca te-am ajutat. Bafta!

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.