Dialog skins for put in OnPlayerRequestClass
#1

I need make dialog skins for put in OnPlayerRequestClass, someone help me?? (actually im starting gamemode)

<---- this is im searching.
Reply
#2

PHP код:
for(new 0287i++)
{
    
AddPlayerClass(ixyz000000); //Replace x, y, z to your coordinates.

Reply
#3

bump
Reply
#4

Take a look at skinchanger.pwn filterscript, it comes with sa-mp server.
Reply
#5

Or if you're completely lazy to code it from the ground up there's a thing named mSelection. Easy to use, but maybe has its limits, which I am not aware of:
https://sampforum.blast.hk/showthread.php?tid=407045
Reply
#6

I'd suggest Gammix's dialog include, found here.

If you want to create something that looks like the picture you included in the OP, here's the code:

pawn Код:
public OnPlayerRequestClass(playerid,classid) {

    const MAX_SKINS = 312;
    static string[MAX_SKINS * 16];
   
    if (string[0] == EOS) {
        for (new i; i < MAX_SKINS; i++) {
            format(string, sizeof string, "%s%i\tID: %i\n", string, i, i);
        }
    }

    return ShowPlayerDialog(playerid, 0, DIALOG_STYLE_PREVIEW_MODEL, "Skin Selection Dialog", string, "Select", "Cancel");
}


public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) {
    if (dialogid == 0) {
        if (response) {
            SetPlayerSkin(playerid, listitem);
            GameTextForPlayer(playerid, "~g~Skin Changed!", 3000, 3);
        }
    }
    return 1;
}
Reply
#7

Thx GrimmReaper, but now dialog is without skins, what is the way for add skins at dialog??

Reply
#8

Did you install the pawn-memory plugin and include it in server.cfg?
Reply
#9

What is name that archive? memory??
Reply
#10

It's called "pawn-memory" and can be found here.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)