Class selection dialog
#1

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

Bump anyone?
Reply
#3

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

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

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

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

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?
Reply
#8

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

What do you mean?
Reply
#10

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


Forum Jump:


Users browsing this thread: 2 Guest(s)