13.07.2016, 00:51
Try this:
pawn Code:
new
bool:IsPlayerLoggedIn[ MAX_PLAYERS ] ;
public OnPlayerConnect(playerid)
{
IsPlayerLoggedIn[ playerid ] = false;
return 1;
}
public OnPlayerRequestSpawn(playerid)
{
if(IsPlayerLoggedIn[ playerid ] == false)
{
TogglePlayerSpectating(playerid, true);
ShowPlayerDialog( playerid , 1 , DIALOG_STYLE_INPUT, "Test", "test", "ok", "cancel" );//show your register dialog
}
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch( dialogid )
{
case 1: { TogglePlayerSpectating(playerid, false); }// change that to your dialog id you've in your script
}
return 1;
}