SA-MP Forums Archive
Class selection dialog - 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: Class selection dialog (/showthread.php?tid=367661)



Class selection dialog - thefatshizms - 10.08.2012

Hello, i have where if your civilian when you spawn you will get a class dialog it works but only problem is when u die and spawn again it doesnt show it again. I tried using varables to make it work but failed so can someone explain me how?

pawn Код:
if(gTeam[playerid] == CIVILIAN)
    {
        SetPlayerColor(playerid, COLOR_WHITE);
        ShowPlayerDialog(playerid, DIALOG_CLASS, DIALOG_STYLE_LIST, "Choose your class", "Drug Dealer\nPedo\nGun merchant\nRobber\nItems dealer\nRapist\nKidnapper", "ok", "cancel");
        return 1;
    }



Re: Class selection dialog - thefatshizms - 11.08.2012

Bump anyone?


Re: Class selection dialog - RedJohn - 11.08.2012

Maybe putting it under
pawn Код:
public OnPlayerSpawn(playerid)
or under
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
Dunno if it will work, just saying...


Re: Class selection dialog - Devilxz97 - 11.08.2012

you want if the player death it will show you the Dialog again ?


Re: Class selection dialog - thefatshizms - 11.08.2012

I want so its always showing when you spawn (spawn after class selection and after death etc)


Re: Class selection dialog - kickerbat - 11.08.2012

Код:
public OnPlayerSpawn(playerid)
{
CODE HERE
}



Re: Class selection dialog - thefatshizms - 11.08.2012

Quote:
Originally Posted by thefatshizms
Посмотреть сообщение
pawn Код:
if(gTeam[playerid] == CIVILIAN)
    {
        SetPlayerColor(playerid, COLOR_WHITE);
        ShowPlayerDialog(playerid, DIALOG_CLASS, DIALOG_STYLE_LIST, "Choose your class", "Drug Dealer\nPedo\nGun merchant\nRobber\nItems dealer\nRapist\nKidnapper", "ok", "cancel");
        return 1;
    }
:facepalm: where do you think this is?


Re: Class selection dialog - kickerbat - 11.08.2012

The OnPlayerSpawn, complete that commad once died/respawned.
If you have it there already re-check your script etc.


Re: Class selection dialog - thefatshizms - 11.08.2012

What do you mean?


Re: Class selection dialog - RedJohn - 11.08.2012

pawn Код:
public OnPlayerSpawn(playerid)
{
    if(gTeam[playerid] == CIVILIAN)
    {
        SetPlayerColor(playerid, COLOR_WHITE);
        ShowPlayerDialog(playerid, DIALOG_CLASS, DIALOG_STYLE_LIST, "Choose your class", "Drug Dealer\nPedo\nGun merchant\nRobber\nItems dealer\nRapist\nKidnapper", "ok", "cancel");
        return 1;
    }
    return 1;
}