04.07.2012, 11:30
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
Who can I make this ?? Thx
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;
}