SA-MP Forums Archive
A simple question? - 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)
+--- Thread: A simple question? (/showthread.php?tid=347601)



A simple question? - Mikibey - 02.06.2012

How can i make a class selection,to save the skin that you selected,in the user's dini file,and when you login again to log you with the skin that its saved,and skip the class selection:P
Is it possible?


Re: A simple question? - Sandiel - 02.06.2012

Yes, of course it is, but I recommend using YSI\y_ini...It's faster and better, I dunno how to work with Dini...good luck


Re: A simple question? - Mikibey - 02.06.2012

i want to use YSI but i cannot find a YSI tutorial that is made with DIAGS i dont like the users to write /register and things like this


Re: A simple question? - iggy1 - 02.06.2012

Find a tutorial on dialogs and find a tutorial on y_ini, and combine the two.


Re: A simple question? - Sandiel - 02.06.2012

Quote:
Originally Posted by Mikibey
Посмотреть сообщение
i want to use YSI but i cannot find a YSI tutorial that is made with DIAGS i dont like the users to write /register and things like this
You need to learn about dialogs (wikipedia is the best refuge for that)
Also, you need a YSI\y_ini tutorial, I think I saw one a couple of days ago on forums...

Here you go: https://sampforum.blast.hk/showthread.php?tid=273088

a question is the key to knowledge, and from there, the key to succes.


Re: A simple question? - Mikibey - 02.06.2012

Thanks,so i followed the tutorial,everything works fine but when i add this part:
Код:
stock udb_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;
}
i get this error
Код:
C:\Users\Mihai\Desktop\Galaxy-Games\gamemodes\Test.pwn(56) : error 021: symbol already defined: "udb_hash" //this one
C:\Users\Mihai\Desktop\Galaxy-Games\gamemodes\Test.pwn(361) : warning 203: symbol is never used: "gPlayerLogged"
C:\Users\Mihai\Desktop\Galaxy-Games\gamemodes\Test.pwn(361) : warning 203: symbol is never used: "ret_memcpy"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
can you help me with this one?

EDIT:wait it looks like it works withnot this one


Re: A simple question? - CyNiC - 02.06.2012

Remove this:
pawn Код:
stock udb_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;
}
It already exists in some include or somewhere in the script.


Re: A simple question? - Mikibey - 02.06.2012

yea..i have another problem,but i will make a new topic.