[HELP]Needs Some Dialog Help!
#1

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


Reply
#2

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.
Reply
#3

Thanks Missing Only Random Skin
Reply
#4

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;
}
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)