Jump to content
  • 0

Problema


GooD

Question

8 answers to this question

Recommended Posts

creezi tu un fisier txd si adaugi in el [pawn]/*

*            YDB functions

*      © Copyright 2010-2011 by Roach

*

* @author    : Roach

* @date      : 7th April 2011

* @require  : Y_ini

*

* This Unit is provided as is (no warranties).

* Feel free to use it, a little message in

*

*/

#include <YSI\y_ini>

#include <YSI\y_stringhash>

stock INI_Hash( buf[ ] ) {

new length=strlen( buf );

    new s1 = 1;

    new s2 = 0;

    new n;

    for ( n=0; n < length; n++ )

    {

      s1 = ( s1 + buf[ n ] ) % 65521;

      s2 = ( s2 + s1 )    % 65521;

    }

    return ( s2 << 16 ) + s1;

}

stock INI_Encode(nickname[]) {

  new tmp[255];

  set(tmp,nickname);

  tmp=strreplace("_","_00",tmp);

  tmp=strreplace(";","_01",tmp);

  tmp=strreplace("!","_02",tmp);

  tmp=strreplace("/","_03",tmp);

  tmp=strreplace("\\","_04",tmp);

  tmp=strreplace("[","_05",tmp);

  tmp=strreplace("]","_06",tmp);

  tmp=strreplace("?","_07",tmp);

  tmp=strreplace(".","_08",tmp);

  tmp=strreplace("*","_09",tmp);

  tmp=strreplace("<","_10",tmp);

  tmp=strreplace(">","_11",tmp);

  tmp=strreplace("{","_12",tmp);

  tmp=strreplace("}","_13",tmp);

  tmp=strreplace(" ","_14",tmp);

  tmp=strreplace("\"","_15",tmp);

  tmp=strreplace(":","_16",tmp);

  tmp=strreplace("|","_17",tmp);

  tmp=strreplace("=","_18",tmp);

  return tmp;

}

stock INI_Decode(nickname[]) {

  new tmp[255];

  set(tmp,nickname);

  tmp=strreplace("_01",";",tmp);

  tmp=strreplace("_02","!",tmp);

  tmp=strreplace("_03","/",tmp);

  tmp=strreplace("_04","\\",tmp);

  tmp=strreplace("_05","[",tmp);

  tmp=strreplace("_06","]",tmp);

  tmp=strreplace("_07","?",tmp);

  tmp=strreplace("_08",".",tmp);

  tmp=strreplace("_09","*",tmp);

  tmp=strreplace("_10","<",tmp);

  tmp=strreplace("_11",">",tmp);

  tmp=strreplace("_12","{",tmp);

  tmp=strreplace("_13","}",tmp);

  tmp=strreplace("_14"," ",tmp);

  tmp=strreplace("_15","\"",tmp);

  tmp=strreplace("_16",":",tmp);

  tmp=strreplace("_17","|",tmp);

  tmp=strreplace("_18","=",tmp);

  tmp=strreplace("_00","_",tmp);

  return tmp;

}

stock INI_Exist(nickname[]) {

  new tmp[255];

  format(tmp,sizeof(tmp),"Accounts/%s.ini",nickname);

  return fexist(tmp);

}

stock INI_ChangePass(nickname[], NewPass[]){

  new tmp[255];

  format(tmp,sizeof(tmp),"Accounts/%s.ini",nickname);

  new INI:File = INI_Open(tmp);

  INI_WriteString(File, "Password", NewPass);

  INI_Close(File);

  return 1;

}

stock INI_ChangeName(nickname[], NewName[]){

  new tmp[255];

  format(tmp,sizeof(tmp),"Accounts/%s.ini",nickname);

  new INI:File = INI_Open(tmp);

  INI_WriteString(File, "Name", NewName);

  INI_SetTag(File, NewName);

  INI_Close(File);

  return 1;

}[/pawn]

punei numele YDB  ..

Care le ai in npc??

Link to comment
Share on other sites

C:\Users\GooD\Desktop\RSD\filterscripts\account.pwn(12) : fatal error 100: cannot read from file: "YDB"

Linia#include    < YDB  >

Ajutor  :D

E un FS cu Login.

Tot nu merge..o lu-am de la capat

Ajutor :D

Poate nu am inteles eu

Cineva mai avansat ?

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.