Dialog question - 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 (
/showthread.php?tid=356619)
Dialog question -
farCry.xD - 04.07.2012
Hey ,I maked a dialog , at player spawn ! , But I want to show the dialog for player just when is first spawn...
Who can I make this ?? Thx
Re: Dialog question -
bhaveshnande - 04.07.2012
pawn Код:
new spawned[MAX_PLAYERS] = 0; // Array
public OnPlayerSpawn(playerid)
{
if(spwaned[playerid] == 0) // Check if the player has spawned before
{
ShowPlayerDialog(...........); // Build your dialog here
spawned[playerid] = 1;
}
//rest of the code
return 1;
}
// Change the state of that particular playerid in array we created when player disconnects
public OnPlayerDisconnect(playerid, reason)
{
if(spwaned[playerid] == 1)
{
spawned[playerid] = 0;
}
return 1;
}
Respuesta: Dialog question -
farCry.xD - 04.07.2012
THX Man , it work's