SA-MP Forums Archive
A clan tag - 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: A clan tag (/showthread.php?tid=144575)



A clan tag - ruckfules99 - 28.04.2010

When a player joins my server with a clan tag, it saves the players name in the file really weird...


instead of saving the players name [Lvcnr]Ownage


It saves it:

_05Lvcnr_06Ownage.dudb



What's the problem?

Heres my register command:

pawn Код:
dcmd_register(playerid,params[]) {

  new plrip[128]; // The varyable
  GetPlayerIp(playerid,plrip,sizeof(plrip));
  // The command shouldn't work if we already are authed
  if (PLAYERLIST_authed[playerid]) return SystemMsg(playerid,"You are already logged into your account");

  // The command shouldn't work if an account with this
  // nick already exists
  if (udb_Exists(PlayerName(playerid))) return SystemMsg(playerid,"This name is registered, please use /login password to log in.");

  if (RegisterLoginDisabled == 1337) return SystemMsg(playerid,"New Account Registrations are Disabled. This is due to maintenance");
  // Did he forgot the password?
  if (strlen(params)==0) return SystemMsg(playerid,"Use: /register password to create a new account");

  // We save the money to the accstate
  if (udb_Create(PlayerName(playerid),params)) {

  dUserSetINT(PlayerName(playerid)).("money",7500);
  dUserSetINT(PlayerName(playerid)).("bankcash",5000);
  dUserSetINT(PlayerName(playerid)).("loancash",0);
  dUserSetINT(PlayerName(playerid)).("cashinsured",0);
  dUserSetINT(PlayerName(playerid)).("regplayer",0);
    dUserSetINT(PlayerName(playerid)).("score",0);
  dUserSetINT(PlayerName(playerid)).("team",0);
  dUserSetINT(PlayerName(playerid)).("skin",0);
  dUserSetINT(PlayerName(playerid)).("jailtime",0);
  dUserSetINT(PlayerName(playerid)).("wallet",0);
  dUserSetINT(PlayerName(playerid)).("cork",0);
  dUserSetINT(PlayerName(playerid)).("drugs",0);
  dUserSetINT(PlayerName(playerid)).("drugbagy",0);
  dUserSetINT(PlayerName(playerid)).("adminlevel",0);
  dUserSetINT(PlayerName(playerid)).("teamkills",0);
  dUserSetINT(PlayerName(playerid)).("innocentkills",0);
  dUserSetINT(PlayerName(playerid)).("lowwantedkills",0);
  dUserSetINT(PlayerName(playerid)).("coprank",0);
  dUserSetINT(PlayerName(playerid)).("robrank",0);
  dUserSetINT(PlayerName(playerid)).("rpabusewar",0);
  dUserSetINT(PlayerName(playerid)).("deaths",0);
  dUserSetINT(PlayerName(playerid)).("casinorob",0);
  dUserSetINT(PlayerName(playerid)).("cashfromcasninorob",0);
  dUserSetINT(PlayerName(playerid)).("atmsrobbed",0);
  dUserSetINT(PlayerName(playerid)).("cashfromatmsrobbed",0);
  dUserSetINT(PlayerName(playerid)).("totaljailtime",0);
  dUserSetINT(PlayerName(playerid)).("finesissued",0);
  dUserSetINT(PlayerName(playerid)).("finespaid",0);
  dUserSetINT(PlayerName(playerid)).("nameban",0);
  dUserSetINT(PlayerName(playerid)).("timesinfected",0);
  dUserSetINT(PlayerName(playerid)).("timesraped",0);
  dUserSetINT(PlayerName(playerid)).("timesrobbed",0);
  dUserSetINT(PlayerName(playerid)).("timeshealed",0);
  dUserSetINT(PlayerName(playerid)).("timescured",0);
  dUserSetINT(PlayerName(playerid)).("hitsplaced",0);
  dUserSetINT(PlayerName(playerid)).("hitsplacedonyou",0);
  dUserSetINT(PlayerName(playerid)).("timessearched",0);
  dUserSetINT(PlayerName(playerid)).("drugssiezedbycops",0);
  dUserSetINT(PlayerName(playerid)).("canusearmy",0);
  dUserSetINT(PlayerName(playerid)).("connectedminute",0);
  dUserSetINT(PlayerName(playerid)).("connectedhour",0);
  dUserSetINT(PlayerName(playerid)).("timesfuckedoff",0);
  dUserSetINT(PlayerName(playerid)).("RegularPlayer",0);
  dUserSet(PlayerName(playerid)).("ipaddress",plrip);



    return SystemMsg(playerid,"Your Account has been created. Login with /login password now to log in (Before Spawn)");

   }
    return true;

 }



Re: A clan tag - Ibanez - 28.04.2010

It's not a problem, its what DUDB is made to do.


Re: A clan tag - ruckfules99 - 28.04.2010

Quote:
Originally Posted by Geo_
It's not a problem, its what DUDB is made to do.
So i can't save it as a normal name instead of having it messed up?


Re: A clan tag - M4S7ERMIND - 28.04.2010

You can, all you need is remove udb_encode everywhere you have it, even from dudb.inc, and rename your account file to [Lvcnr]Ownage.dudb.
You should also know that a filename cannot contain any of the following characters \ / : * ? " < > | and none of those characters are allowed
in player's name.. atleast in current samp release, so you can safely remove udb_encode.


Re: A clan tag - ruckfules99 - 28.04.2010

Quote:
Originally Posted by Mастерминд
You can, all you need is remove udb_encode everywhere you have it, even from dudb.inc, and rename your account file to [Lvcnr]Ownage.dudb.
You should also know that a filename cannot contain any of the following characters \ / : * ? " < > | and none of those characters are allowed
in player's name.. atleast in current samp release, so you can safely remove udb_encode.
Oh ok, thank you very much.