[HELP]Needs Help With Classes In Dialog
#4

Quote:
Originally Posted by arakuta
Посмотреть сообщение
You must put the texts at the public OnPlayerRequestClass...

pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
    switch(classid) // Instead of use a lot of conditions, we go directly to the classid condition
    {
        case 0: GameTextForPlayer(playerid,"This Is An ~r~Red Exemple!",3000,2); // show this text is classid is 0, (First AddPlayerClass)
        case 1: GameTextForPlayer(playerid,"This Is An ~b~Blue Exemple!",3000,2); // show this text is classid is 1, (Second AddPlayerClass)
        case 3: GameTextForPlayer(playerid,"This Is An ~r~Green Exemple!",3000,2);
        case 4: GameTextForPlayer(playerid,"This Is An ~p~Pink Exemple!",3000,2);
    }
    return 1;
}
And about the dialog, use ShowPlayerDialog function and OnPlayerDialogResponse to get the player responses.

https://sampforum.blast.hk/showthread.php?tid=379247 - Tutorial

Randon skin is easy too, just create an array to store the skin numbers and do a Random selection over these array numbers...

At The Top

pawn Код:
new TuckerSkins[10] // Create a 10 "slots" variable and assign a skin value for each "slot" (Remeber: Slots are 0-9, not 1-10)
{
    1,2,3,4,5,6,7,8,9,10
}
Now call this stock function where you want (such as OnPlayerSpawn, CMD, etc)

pawn Код:
SetPlayerRandomTruckerSkin(playerid);
And put the stock at the end of the script
pawn Код:
stock SetPlayerRandomTruckerSkin(playerid)
{
    new resultskin = random(sizeof TruckerSkins);
    SetPlayerSkin(playerid,resultskin);
}
Thanks Helpful But.. I Want Class Selection In Dialogs Like :

The DiALOG Under Class Selection
Reply


Messages In This Thread
[HELP]Needs Help With Classes In Dialog - by KomplettMaster - 05.01.2013, 13:12
Re: [HELP]Needs Help With Classes In Dialog - by arakuta - 05.01.2013, 15:07
Wrong - by KomplettMaster - 05.01.2013, 15:47
Re: [HELP]Needs Help With Classes In Dialog - by KomplettMaster - 05.01.2013, 15:49
Re: [HELP]Needs Help With Classes In Dialog - by KomplettMaster - 05.01.2013, 19:01
Re: [HELP]Needs Help With Classes In Dialog - by aslan890 - 05.01.2013, 19:19
Re: [HELP]Needs Help With Classes In Dialog - by KomplettMaster - 06.01.2013, 11:33

Forum Jump:


Users browsing this thread: 1 Guest(s)