08.06.2013, 19:25
try something like this
If you want more dialogs to appear after registering, do something like this
Sorry if this isn't what you were asking but I am pretty sure this will help you.
PHP Code:
public OnPlayerConnect(playerid)
{
SetSpawnInfo(playerid,0,0,0,0,0,45.0,0,0,0,0,0,0);
SpawnPlayer(playerid);
TogglePlayerSpectating(playerid,true);
//show the dialogs for register/login
return 1;
}
PHP Code:
public OnDialogResponse(playerid,response,listitem,inputtext)
{
if(dialogid == REGISTER_DIALOG)
{
//register the players account with your system
//Show them the age dialog
}
else if(dialogid == AGE_DIALOG)
{
//show them the gender dialog
}
else if(dialogid == GENDER_DIALOG)
{
//okay since the player has now registered set their and and gender lets stick them to their first spawn!
TogglePlayerSpectating(playerid,false);
SetSpawnInfo(playerid,team,skin,X,Y,Z,FacingAngle,Gun1,Ammo1,Gun2,Ammo2,Gun3,Ammo3);
SpawnPlayer(playerid);
}
else if(dialogid == login)
{
//if the pasword matches and they log in
TogglePlayerSpectating(playerid,false);
SetSpawnInfo(playerid,team,skin,X,Y,Z,FacingAngle,Gun1,Ammo1,Gun2,Ammo2,Gun3,Ammo3);
SpawnPlayer(playerid);
}
return 1;
}