caltabos Posted April 9, 2019 Posted April 9, 2019 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
0 RaduRZM Posted April 10, 2019 Posted April 10, 2019 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 caltabos Posted April 11, 2019 Author Posted April 11, 2019 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
Question
caltabos
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
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 accountSign in
Already have an account? Sign in here.
Sign In Now