SA-MP Forums Archive
Dialog Question << reps ! >> - 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: Dialog Question << reps ! >> (/showthread.php?tid=482472)



Dialog Question << reps ! >> - MahdiGames - 21.12.2013

Hello , how to make dialog onplayerspawn that only 1 time play got the dialog , so if respawned again the dialog will not show, in fact its radio dialog
OnPlayerSpawn
Код:
		ShowPlayerDialog(playerid,Radio,DIALOG_STYLE_MSGBOX,"Would you torn off the radio.","Yes","No");



Re: Dialog Question << reps ! >> - ScRipTeRi - 21.12.2013

pawn Код:
new Spawned[MAX_PLAYERS];

//OnPlayerConnect
Spawned[playerid] = 0;

//OnPlayerSpawn
if(Spawned[playerid] == 0)
{
    Spawned[playerid] = 1;
    ShowPlayerDialog(playerid,Radio,DIALOG_STYLE_MSGBOX,"Would you torn off the radio.","Yes","No");
}



Re: Dialog Question << reps ! >> - Konstantinos - 21.12.2013

pawn Код:
// Global:
new
    bool: First_Spawn[MAX_PLAYERS char];

// OnPlayerConnect:
First_Spawn{playerid} = true;

// OnPlayerSpawn:
if (First_Spawn{playerid})
{
    ShowPlayerDialog(playerid, Radio, DIALOG_STYLE_MSGBOX, "Would you torn off the radio.", "Yes", "No");
    First_Spawn{playerid} = false;
}



Re: Dialog Question << reps ! >> - MahdiGames - 21.12.2013

Thanks + reps!