Jump to content

Question

Posted

Salut, imi poate spune cineva cum sa fac un sisitem sa iti alegi pet-ul!
Eu am facut ceva, dar nu merge:

#define DIALOG_PETTYPE 			365
/////////////////////////////////////////////////

}
CMD:pett(playerid, params[]) return cmd:pettype(playerid, params);
CMD:pettype(playerid, params[]) {
	new string[128];
	if(PlayerInfo[playerid][pPet] == 0) return SCM(playerid, -1, "Nu detii un pet!");
	ShowPlayerDialog(playerid, DIALOG_PETTYPE, DIALOG_STYLE_TABLIST, "Pet Type", string, "Select", "Cancel");
	strcat(string);
	return 1;
}	
//////////////////////////////////////////////////
		}
		case DIALOG_PETTYPE: {
		if(!response) return 1;
		switch(listitem) {
			case 0: {
				SetPlayerAttachedObject(playerid, 6, 19078, 17, 0.021065, -0.100726, 0.143000, 357.120239, 1.712298, 349.232513, 1.000000, 1.000000, 1.120420 );
			}
			case 1: {
				SetPlayerAttachedObject(playerid, 7, 1371, 17, 0.021065, -0.100726, 0.143000, 357.120239, 1.712298, 349.232513, 1.000000, 1.000000, 1.120420 );
			}
			case 2: {
				SetPlayerAttachedObject(playerid, 8, 1608, 17, 0.021065, -0.100726, 0.143000, 357.120239, 1.712298, 349.232513, 1.000000, 1.000000, 1.120420 );
			}
		}

Sau macar editati scriptul meu sa fie bun! sau macar un exemplu

2 answers to this question

Recommended Posts

  • 0
Posted

ShowPlayerDialog(playerid, DIALOG_PETTYPE, DIALOG_STYLE_TABLIST, "Pet Type", string, "Select", "Cancel");

La linia asta, string-ul este gol, deci nu va exista nicio optiune

Formateaza string-ul cu niste optiuni reale sau inlocuieste "string" in acea linie cu ceva de genul "Pet 1\nPet 2\nPet 3"

  • 0
Posted
Acum 13 ore, RaduRZM a spus:

ShowPlayerDialog(playerid, DIALOG_PETTYPE, DIALOG_STYLE_TABLIST, "Pet Type", string, "Select", "Cancel");

La linia asta, string-ul este gol, deci nu va exista nicio optiune

Formateaza string-ul cu niste optiuni reale sau inlocuieste "string" in acea linie cu ceva de genul "Pet 1\nPet 2\nPet 3"

lasa ca l-am facut in alt mod sa poti schimba direct din comanda /pet si sa apara acolo tip pet, mersi oricum

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • 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.