08.04.2013, 11:55
Okay, you mean show dialog only 1 time at first spawn? If yes, then you have to use something like this:
I think this is what you're asking for and it shall work fine.
PHP код:
// Top of script
new WeaponDialogs[MAX_PLAYERS];
public OnPlayerConnect(playerid)
{
WeaponDialogs[playerid] = 1;
return 1;
}
public OnPlayerSpawn(playerid)
{
if(WeaponDialogs[playerid] == 1)
{
ShowPlayerDialog(playerid, DIALOG_WEAPONS, DIALOG_STYLE_LIST, "What type of weapon do you want?", "Melee Weapons \nPistols\nShotguns\nSub-Machine Guns\nRifles\nJetpack\nCamera\nMinigun", "Search", "Cancel");
WeaponDialogs[playerid] = 0;
}
return 1;
}