Show dialog after clicking "Spawn" button
#6

Try this:
pawn Code:
new
        bool:IsPlayerLoggedIn[ MAX_PLAYERS ] ;

public OnPlayerConnect(playerid)
{
    IsPlayerLoggedIn[ playerid ] = false;
    return 1;
}

public OnPlayerRequestSpawn(playerid)
{
    if(IsPlayerLoggedIn[ playerid ] == false)
    {
        TogglePlayerSpectating(playerid, true);
        ShowPlayerDialog( playerid , 1 , DIALOG_STYLE_INPUT, "Test", "test", "ok", "cancel" );//show your register dialog
    }
    return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    switch( dialogid )
    {
        case 1: { TogglePlayerSpectating(playerid, false); }// change that to your dialog id you've in your script
    }
    return 1;
}
Reply


Messages In This Thread
Show dialog after clicking "Spawn" button - by kampuman - 13.07.2016, 00:25
Re: Show dialog after clicking "Spawn" button - by SilentSoul - 13.07.2016, 00:31
Re: Show dialog after clicking "Spawn" button - by kampuman - 13.07.2016, 00:40
Re: Show dialog after clicking "Spawn" button - by SilentSoul - 13.07.2016, 00:43
Re: Show dialog after clicking "Spawn" button - by kampuman - 13.07.2016, 00:44
Re: Show dialog after clicking "Spawn" button - by SilentSoul - 13.07.2016, 00:51
Re: Show dialog after clicking "Spawn" button - by kampuman - 13.07.2016, 01:11
Re: Show dialog after clicking "Spawn" button - by Napst34 - 13.07.2016, 02:51
Re: Show dialog after clicking "Spawn" button - by kampuman - 13.07.2016, 03:22

Forum Jump:


Users browsing this thread: 1 Guest(s)