SA-MP Forums Archive
[HELP]Needs Some Dialog Help! - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [HELP]Needs Some Dialog Help! (/showthread.php?tid=403451)



[HELP]Needs Some Dialog Help! - KomplettMaster - 30.12.2012

Hey
I Making Class Selection In Dialogs But....
When Player Press Cancel Button They Not Be Kicked And Can Press Cancel And Play..
And Someone Know How I Can Make Random Spawns With Own Coords?!?!?
I Not Want 1 Spawn But More.
Someone Know And How I Can Make So Players Get Random Skins I Choose?
Code :
http://pastebin.com/rMECR7XV
Please Fix That And Add Pastebin Link So I Only Replace In Gamemode





Re: [HELP]Needs Some Dialog Help! - Feastahashi - 30.12.2012

Random spawns: https://sampwiki.blast.hk/wiki/Random

Random skins: same process above, but you will just one variable to set player's skin, and you include the numbers you want on the same array.

If you want to get Player kicked on press CANCEL, put it on your certain dialog:

pawn Код:
if(response)// They pressed the first button.
    {
        switch(dialogid)// If you only have one dialog, then this isn't required, but it's neater for when you implement more dialogs.
        {
            case DIALOG_CLASS:// Our dialog!
            {
                switch(listitem)// Checking which listitem was selected
                {
                    case 0:// The first item listed
                    {
                        SetSpawnInfo(playerid, 0, 0, -546.0, 2594.0, 54.0, 270.0, 0, 0, 0, 0, 0, 0 );
                        SpawnPlayer(playerid);
                    }
                    case 1: // The second item listed
                    {
                                SetSpawnInfo(playerid, 0, 0, -379.09, -1445.18, 25.72, 180.0, 0, 0, 0, 0, 0, 0 );
                        SpawnPlayer(playerid);
                    }
                }
            }
        }
     }
     else return Kick(playerid); // if he didn't choose the first button, will kick him.



Re: [HELP]Needs Some Dialog Help! - KomplettMaster - 30.12.2012

Thanks Missing Only Random Skin


Re: [HELP]Needs Some Dialog Help! - Feastahashi - 30.12.2012

Random skins:

pawn Код:
new RandSkin[][] =
{
    144, 145, 146, 147, 148 // On script's top. Here are the skins number you want to randomize.
};

public OnPlayerSpawn(playerid) // You may change it for any callback you want
{
    new rand = random(sizeof(RandSkin));
    SetPlayerSkin(playerid, rand);
    return 1;
}