SA-MP Forums Archive
ShowPlayerDialog at OnPlayerConnect stops classelection from being called - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: ShowPlayerDialog at OnPlayerConnect stops classelection from being called (/showthread.php?tid=99185)



ShowPlayerDialog at OnPlayerConnect stops classelection from being called - ғαιιοцт - 26.09.2009

The classselection isn't shown when you have ShowPlayerDialog at OnPlayerConnect

this happens from 0.3 RC7


Quote:
Updates:

RC7-1

- Fixed some problems using input dialog at class selection.

it always worked for me, untill this has changed


Re: ShowPlayerDialog at OnPlayerConnect stops classelection from being called - Kyle - 26.09.2009

Works fine for me?


Re: ShowPlayerDialog at OnPlayerConnect stops classelection from being called - SpiderPork - 26.09.2009

It works for me...


Re: ShowPlayerDialog at OnPlayerConnect stops classelection from being called - ғαιιοцт - 26.09.2009

for me, it doesn't show the class selection untill I selected one of the buttons


Re: ShowPlayerDialog at OnPlayerConnect stops classelection from being called - AcId n RaPiD - 26.09.2009

Works for me.


Re: ShowPlayerDialog at OnPlayerConnect stops classelection from being called - ғαιιοцт - 26.09.2009

pff

ok, then what's wrong here?
it worked in any previous version
Код:
public OnPlayerConnect(playerid)
{
	//SafeZones
	GangZoneShowForPlayer(playerid, LVSpawnSZ, SZColor);
	GangZoneShowForPlayer(playerid, SFASpawnSZ, SZColor);
	GangZoneShowForPlayer(playerid, ChilliadSZ, SZColor);
	GangZoneShowForPlayer(playerid, AASpawnSZ, SZColor);
	GangZoneShowForPlayer(playerid, LSASpawnSZ, SZColor);
	GangZoneShowForPlayer(playerid, DamSpawnSZ, SZColor);
	GangZoneShowForPlayer(playerid, RCSpawnSZ, SZColor);

	//DMZones
	GangZoneShowForPlayer(playerid, DMZone1, DMZColor);
	
	if(!xini_exist("ServerStats.ini"))
	{
		xini_create("ServerStats.ini");
	}
	xini_setint("ServerStats.ini", "Players", "PlayersJoined", xini_int("ServerStats.ini","Players","PlayersJoined",false)+1, false);

	for(new slot=0; slot<=10; slot++)
  {
		SavedX[playerid][slot] = 0.0;
		SavedY[playerid][slot] = 0.0;
		SavedZ[playerid][slot] = 0.0;
		SavedA[playerid][slot] = 0.0;
		SavedI[playerid][slot] = 0;
	}

	for(new stunt=0; stunt<50; stunt++)
  {
  	StuntPointTaken[playerid][stunt] = false;
	}

  DMRespawn[playerid] = 0;
	DMZone[playerid] = 0;
	RaceStartCPCreated[playerid] = false;
	PlayerRacing[playerid] = false;
  LiftMoving[playerid] = false;
	LiftStandingStillUp[playerid] = false;
	LiftStandingStillDown[playerid] = true;
	PlatformsCreated[playerid] = false;
	TextDrawsShown[playerid] = false;
	VHSCreated[playerid] = false;
	LightRedHealthCreated[playerid] = false;
	LightYellowSpeedCreated[playerid] = false;
  GoToOn[playerid] = true;
  AutoFixOn[playerid] = true;
  AFK[playerid] = false;
	InfoMessagesOn[playerid] = true;
	AntiFalloff[playerid] = false;
	InCar[playerid] = false;
  BombArmed[playerid] = false;
  PlayerHasBomb[playerid] = 0;
	PlayerStuntPoints[playerid] = 0;
	HideMoneyTexttRunning[playerid] = false;
	MoneyTextShown[playerid] = false;
	DestroyInfoTexttRunning[playerid] = false;
	DestroyInfoTexttRunning2[playerid] = false;
	DestroyInfoTextToAlltRunning = false;
	InfoTextShown[playerid] = false;
	InfoTextCreated2[playerid] = false;
	InfoTextToAllShown[playerid] = false;
	Muted[playerid] = false;

	PlayerMoney[playerid] = 0;
	PlayerBankMoney[playerid] = 0;
	PlayerRank[playerid] = 0;
	PlayerLoggedIn[playerid] = 0;
  PlayerCokOPops[playerid] = 0;
	CurrentSpawnView[playerid] = 0;

	RadioShown[playerid] = false;
	PickupsCreated[playerid] = false;
	MoneyBeforeDied[playerid] = 0;

  new name[MAX_PLAYER_NAME], File[64];
	GetPlayerName(playerid, name, sizeof name);
	format(File, sizeof File, "UserFiles/%s.ini", name);
	if (xini_exist(File))
	{
    xini_set(File,"Info","Online","Yes",false);
	}

	//Hospitals
	SetPlayerMapIcon(playerid, 0, 1581.9529,1765.1115,10.4000, 22, 0 );
	SetPlayerMapIcon(playerid, 1, -314.7613, 1049.4744, 19.7443, 22, 0 );
	SetPlayerMapIcon(playerid, 2, -1511.2435, 2518.9419, 55.2682, 22, 0 );
	SetPlayerMapIcon(playerid, 3, -2200.6379, -2305.8945, 30.0290, 22, 0 );
	SetPlayerMapIcon(playerid, 4, -2677.8521, 634.5194, 13.8571, 22, 0 );
	SetPlayerMapIcon(playerid, 5, -2677.8521, 634.5194, 13.8571, 22, 0 );
	SetPlayerMapIcon(playerid, 6, 1172.1625, -1328.1008, 14.8036, 22, 0 );

	//DollarIcons
	SetPlayerMapIcon(playerid, 7, -2395.8655,-40.8319,35.3125, 52, 0 ); //HomeMade 24-7
	SetPlayerMapIcon(playerid, 8, 1007.1584,-917.0974,46.6641, 52, 0 ); //24-7
	SetPlayerMapIcon(playerid, 9, 1841.6007,-1842.8639,17.0780, 52, 0 ); //24-7
	SetPlayerMapIcon(playerid, 10, 1350.6414,-1764.1642,19.0781, 52, 0 ); //24-7
	SetPlayerMapIcon(playerid, 11, 1315.8279,-889.0602,45.2266, 52, 0 ); //24-7
	SetPlayerMapIcon(playerid, 12, -1561.9849,-2729.2844,53.0564, 52, 0 ); //24-7

	TextDrawShowForPlayer(playerid, Text:TdLogo1);
	TextDrawShowForPlayer(playerid, Text:TdLogo2);

	TextDrawShowForPlayer(playerid, Text:TdWebsite);

	new NewPlayer[128];
  format(NewPlayer, sizeof NewPlayer, "%s has joined the server.", name);
	for(new i=0; i<MAX_PLAYERS; i++)
	{
	  if(IsPlayerConnected(i) && i != playerid)
	  {
	    SendClientMessage(i, COLOR_GREY, NewPlayer);
	  }
	}

	SendClientMessage(playerid, COLOR_GREY, "Welcome to Stunt Universe (v2.1)");
	SendClientMessage(playerid, COLOR_GREY, "For more info, type /help.");
	SendClientMessage(playerid, COLOR_GREY, "Last update: Races added! see /teles (/teleports)");

	new String[128];
	format(String, sizeof String, "Welcome %s, please enter your password.", name);
  ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT, "Login - Register", String, "Login", "Register");
  return 1;
}



Re: ShowPlayerDialog at OnPlayerConnect stops classelection from being called - Karlip - 26.09.2009

Also doesn't work for me, but i added a simple variable to fix it.

Make a variable to check if the player has just connected( = 1; on OnPlayerConnect)
then after going to OnPlayerRequestClass, check if they've just connected, show them the dialog and set the variable to false.


Re: ShowPlayerDialog at OnPlayerConnect stops classelection from being called - ғαιιοцт - 26.09.2009

Quote:
Originally Posted by Karlip
Also doesn't work for me, but i added a simple variable to fix it.

Make a variable to check if the player has just connected( = 1; on OnPlayerConnect)
then after going to OnPlayerRequestClass, check if they've just connected, show them the dialog and set the variable to false.
yes, I thought the same, but I wanted to report the bug here
so it might get fixed in the next version,
thanks any ways ^^ it'll work this way


Re: ShowPlayerDialog at OnPlayerConnect stops classelection from being called - shady91 - 26.09.2009

yea for me to look.

in rc6 when my server starts up with a login dialog box and works fine, but on rc7 when my dialog box appears its like it doesn't read my
OnPlayerRequestClass and when i click cancel it then reads my OnPlayerRequestClass but when i login it doesn't read my onplayerspawn i dont get this in RC6 only in RC7 im posting a video of it so you can understand better.

RC-6 Working Geat

rc 6

RC-7 not working watch how when i click cancel it loads OnPlayerRequestClass and then when it spawns me it don't read my onplayerspawn, but it reads it fine in RC-6 and every other version.
rc 7


Re: ShowPlayerDialog at OnPlayerConnect stops classelection from being called - ғαιιοцт - 26.09.2009

well yea, it does kind of exactly the same to me.