Jump to content

Ajutor comanda


Recommended Posts

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!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.