SA-MP Forums Archive
Dialog registration help - 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: Dialog registration help (/showthread.php?tid=112834)



Dialog registration help - Naruto4 - 10.12.2009

I am using ErroRs Registration system that is based on seifs.
Код:
http://forum.sa-mp.com/index.php?topic=122308.0
and i have a problem.
When i /q and rejoin,all info(faction,job) are not read.When i check the user file Faction etc seems allright (faction=1)but it spawns me ingame as faction 0.
Код:
public PlayerSpawn(playerid)
{
	if(AccountInfo[playerid][aFaction] == 0)
	{
	PlayerPlaySound(playerid, 1063, 0.0, 0.0, 0.0);
  SetSpawnInfo(playerid, 0, 7, 1958.33, 1343.12, 15.36, 269.20, 0, 0, 0, 0, 0, 0 );
  SpawnPlayer(playerid);
	}
	else if(AccountInfo[playerid][aFaction] == 1)
	{
	PlayerPlaySound(playerid, 1063, 0.0, 0.0, 0.0);
	SetSpawnInfo( playerid, 0, 280, 238.0611,144.3585,1003.0234,7.0383, 0, 0, 0, 0, 0, 0 );
	SetPlayerInterior(playerid,3);
  SpawnPlayer(playerid);
  GiveGuns(playerid);
	}
	else if(AccountInfo[playerid][aFaction] == 2)
	{
	PlayerPlaySound(playerid, 1063, 0.0, 0.0, 0.0);
  SetSpawnInfo( playerid, 0, 124, 1038.531372,0.111030,1001.284484,180.0, 0, 0, 0, 0, 0, 0 );
  SetPlayerInterior(playerid,3);
  SpawnPlayer(playerid);
	}
	return 1;
}
and i putted ondialogresponse after some dialog when the player succesfully logs.
Код:
PlayerSpawn(playerid);
anyone know what the problem might be ??
btw. i have all cmds and they save correcly but cant be loaded on player connect


Re: Dialog registration help - Naruto4 - 10.12.2009

what does this do
Код:
if(strcmp(key, "AdminLevel", true) == 0) // This is only an example if you want to add more stuff to store in a file.

                        {
                            val = ini_GetValue( Data );
                            AccountInfo[playerid][AdminLevel] = strval(val); // Uncommenting this will give you errors if the variable isn't defined.

                        }



Re: Dialog registration help - Naruto4 - 10.12.2009

SOLVED.