[Tutorial] How to make a register system ( Dialogs, SQLite and rBits )
#38

Quote:
Originally Posted by Lorenc_
View Post
It's okay, though I don't see whats the point of going through the whole process of just replacing ReturnPlayerName, but what ever you say. I'll be replacing it in the next version along with using DB_Escape to exit exploits. The estimated time when this'll come is unknown due to me being quite busy at the moment.

EDIT: I've now updated the tutorial [ Version: 1.5 ]



Replace your rBits include with:
pawn Code:
/*
    SA-MP "rBits" Include
    Copyright © 2011 RyDeR`
*/


#if defined _Included_rBits
    #endinput
#endif

#define _Included_rBits

#define BIT_TAGS \
    { Bit1, Bit2, Bit4, Bit8, Bit16 }

enum e_Bits
{
    Bit1,
    Bit2,
    Bit4,
    Bit8,
    Bit16,
    Bit32
};

#define Bit1:%0<%1> \
    Bit1: %0[((%1) + 31) >>> _: Bit32]

#define Bit1_Set(%0,%1,%2) \
    Bit_Set(%0, (%1), (%2), Bit1)

#define Bit1_Get(%0,%1) \
    Bit_Get(%0, (%1), Bit1)

#define Bit2:%0<%1> \
    Bit2: %0[((%1) + 15) >>> _: (Bit32 - Bit2)]

#define Bit2_Set(%0,%1,%2) \
    Bit_Set(%0, (%1), (%2), Bit2)

#define Bit2_Get(%0,%1) \
    Bit_Get(%0, (%1), Bit2)

#define Bit4:%0<%1> \
    Bit4: %0[((%1) + 7) >>> _: (Bit32 - Bit4)]

#define Bit4_Set(%0,%1,%2) \
    Bit_Set(%0, (%1), (%2), Bit4)

#define Bit4_Get(%0,%1) \
    Bit_Get(%0, (%1), Bit4)

#define Bit8:%0<%1> \
    Bit8: %0[(%1) char]

#define Bit8_Set(%0,%1,%2) \
    (_: %0{(%1)} = (%2))

#define Bit8_Get(%0,%1) \
    (_: %0{(%1)})

#define Bit16:%0<%1> \
    Bit16: %0[((%1) + 1) >>> _: (Bit32 - Bit16)]

#define Bit16_Set(%0,%1,%2) \
    Bit_Set(%0, (%1), (%2), Bit16)

#define Bit16_Get(%0,%1) \
    Bit_Get(%0, (%1), Bit16)

stock Bit_Set(BIT_TAGS: bitArr[], arrIdx, value, e_Bits: bitShift, arrSize = sizeof(bitArr))
{
    new
        bitVar = ((arrIdx & ((1 << _: (Bit32 - bitShift)) - 1)) << _: bitShift),
        bitLim = ((1 << (1 << _: bitShift)) - 1)
    ;
    if(!(0 <= (arrIdx >>>= _: (Bit32 - bitShift)) < arrSize))
        return 0;

    (_: bitArr[arrIdx]) &= ~(bitLim << bitVar);
    (_: bitArr[arrIdx]) |= ((bitLim & value) << bitVar);

    return 1;
}

stock Bit_Get(BIT_TAGS: bitArr[], arrIdx, e_Bits: bitShift, arrSize = sizeof(bitArr))
{
    new
        bitVar = ((arrIdx & ((1 << _: (Bit32 - bitShift)) - 1)) << _: bitShift),
        bitLim = ((1 << (1 << _: bitShift)) - 1)
    ;
    if(!(0 <= (arrIdx >>>= _: (Bit32 - bitShift)) < arrSize))
        return 0;

    return ((_: bitArr[arrIdx] >>> bitVar) & bitLim);
}
I get no errors on this.
man after using this rbit i get these errors
[/pawn]C:\Users\Anmol\Desktop\LOGIN.pwn(64) : warning 217: loose indentation
C:\Users\Anmol\Desktop\LOGIN.pwn(7 : error 017: undefined symbol "ShowPlayerDialog"
C:\Users\Anmol\Desktop\LOGIN.pwn(85) : error 017: undefined symbol "ShowPlayerDialog"
C:\Users\Anmol\Desktop\LOGIN.pwn(91) : warning 235: public function lacks forward declaration (symbol "OnDialogResponse")
C:\Users\Anmol\Desktop\LOGIN.pwn(140) : error 017: undefined symbol "ShowPlayerDialog"
C:\Users\Anmol\Desktop\LOGIN.pwn(15 : error 017: undefined symbol "ShowPlayerDialog"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.
[/pawn]
Reply


Messages In This Thread
How to make a register system ( Dialogs, SQLite and rBits ) - by Lorenc_ - 21.08.2011, 03:54
Re: How to make a register system ( Dialogs, SQLite and rBits ) - by Jack_Wilson - 21.08.2011, 03:55
Re: How to make a register system ( Dialogs, SQLite and rBits ) - by Lorenc_ - 21.08.2011, 04:19
Re: How to make a register system ( Dialogs, SQLite and rBits ) - by Kush - 21.08.2011, 07:21
Re: How to make a register system ( Dialogs, SQLite and rBits ) - by Davz*|*Criss - 21.08.2011, 07:24
Re: How to make a register system ( Dialogs, SQLite and rBits ) - by juraska - 21.08.2011, 08:17
Re: How to make a register system ( Dialogs, SQLite and rBits ) - by Kaperstone - 21.08.2011, 10:08
Re: How to make a register system ( Dialogs, SQLite and rBits ) - by Darnell - 21.08.2011, 10:57
Re: How to make a register system ( Dialogs, SQLite and rBits ) - by Lorenc_ - 21.08.2011, 11:27
Re: How to make a register system ( Dialogs, SQLite and rBits ) - by Kush - 21.08.2011, 12:06
Re: How to make a register system ( Dialogs, SQLite and rBits ) - by Scenario - 21.08.2011, 12:09
Re: How to make a register system ( Dialogs, SQLite and rBits ) - by antonio112 - 21.08.2011, 13:02
Re: How to make a register system ( Dialogs, SQLite and rBits ) - by Lorenc_ - 21.08.2011, 22:01
Re: How to make a register system ( Dialogs, SQLite and rBits ) - by Bakr - 22.08.2011, 02:13
Re: How to make a register system ( Dialogs, SQLite and rBits ) - by Lorenc_ - 22.08.2011, 06:41
Re: How to make a register system ( Dialogs, SQLite and rBits ) - by Tee - 22.08.2011, 08:43
Re: How to make a register system ( Dialogs, SQLite and rBits ) - by Lorenc_ - 22.08.2011, 09:08
Re: How to make a register system ( Dialogs, SQLite and rBits ) - by Cowboy - 22.08.2011, 11:48
Re: How to make a register system ( Dialogs, SQLite and rBits ) - by HyperZ - 22.08.2011, 13:44
Re: How to make a register system ( Dialogs, SQLite and rBits ) - by Gh0sT_ - 22.08.2011, 14:32
Re: How to make a register system ( Dialogs, SQLite and rBits ) - by Bakr - 22.08.2011, 14:40
Re: How to make a register system ( Dialogs, SQLite and rBits ) - by Cowboy - 22.08.2011, 14:50
Re: How to make a register system ( Dialogs, SQLite and rBits ) - by AndreT - 22.08.2011, 18:05
Re: How to make a register system ( Dialogs, SQLite and rBits ) - by Lorenc_ - 23.08.2011, 06:52
Re: How to make a register system ( Dialogs, SQLite and rBits ) - by XFlawless - 23.08.2011, 11:15
Re: How to make a register system ( Dialogs, SQLite and rBits ) - by Lorenc_ - 23.08.2011, 11:19
Re: How to make a register system ( Dialogs, SQLite and rBits ) - by AndreT - 24.08.2011, 15:48
Re: How to make a register system ( Dialogs, SQLite and rBits ) - by vIBIENNYx - 24.08.2011, 20:18
Re: How to make a register system ( Dialogs, SQLite and rBits ) - by Lorenc_ - 25.08.2011, 06:31
Re: How to make a register system ( Dialogs, SQLite and rBits ) - by Cowboy - 25.08.2011, 08:22
Re: How to make a register system ( Dialogs, SQLite and rBits ) - by Lorenc_ - 26.08.2011, 17:26
Re: How to make a register system ( Dialogs, SQLite and rBits ) - by HotPlayer - 26.08.2011, 17:44
Re: How to make a register system ( Dialogs, SQLite and rBits ) - by JaTochNietDan - 28.08.2011, 01:11
Re: How to make a register system ( Dialogs, SQLite and rBits ) - by Lorenc_ - 28.08.2011, 01:46
Re: How to make a register system ( Dialogs, SQLite and rBits ) - by Mr.Fames - 07.11.2011, 19:01
Re: How to make a register system ( Dialogs, SQLite and rBits ) - by Lorenc_ - 30.11.2011, 09:06
Re: How to make a register system ( Dialogs, SQLite and rBits ) - by Mr.Fames - 02.12.2011, 11:58
Re: How to make a register system ( Dialogs, SQLite and rBits ) - by TRIPLE-xXx-GAMEING - 02.03.2012, 14:29
Re: How to make a register system ( Dialogs, SQLite and rBits ) - by Edvin - 04.03.2012, 13:34
Re: How to make a register system ( Dialogs, SQLite and rBits ) - by Konstantinos - 04.03.2012, 13:36
Re: How to make a register system ( Dialogs, SQLite and rBits ) - by nitrochegs - 10.03.2012, 04:18
Re: How to make a register system ( Dialogs, SQLite and rBits ) - by HDFord - 11.03.2012, 15:49
Re: How to make a register system ( Dialogs, SQLite and rBits ) - by Lorenc_ - 12.03.2012, 02:27
Re: How to make a register system ( Dialogs, SQLite and rBits ) - by TTJJ - 13.03.2012, 11:32
Re: How to make a register system ( Dialogs, SQLite and rBits ) - by Karl[NDZ] - 19.03.2012, 17:47
Re: How to make a register system ( Dialogs, SQLite and rBits ) - by Danny1 - 18.04.2012, 15:28
Re: How to make a register system ( Dialogs, SQLite and rBits ) - by Danny1 - 20.04.2012, 12:49
Re: How to make a register system ( Dialogs, SQLite and rBits ) - by KaWavan - 20.04.2012, 21:20
Re: How to make a register system ( Dialogs, SQLite and rBits ) - by Djumza - 21.04.2012, 22:42
Re: How to make a register system ( Dialogs, SQLite and rBits ) - by Jonny5 - 25.04.2012, 21:17
Re : How to make a register system ( Dialogs, SQLite and rBits ) - by yusei - 26.07.2012, 16:35
Re: How to make a register system ( Dialogs, SQLite and rBits ) - by iSaad - 10.09.2012, 07:26
Re: How to make a register system ( Dialogs, SQLite and rBits ) - by jamesmercer1947 - 10.09.2012, 14:46
Respuesta: How to make a register system ( Dialogs, SQLite and rBits ) - by u3games - 19.12.2012, 11:01
Re: How to make a register system ( Dialogs, SQLite and rBits ) - by Lorenc_ - 21.12.2012, 21:54
Re: How to make a register system ( Dialogs, SQLite and rBits ) - by denilson_staff - 22.12.2012, 03:09
Re: How to make a register system ( Dialogs, SQLite and rBits ) - by DJTunes - 22.12.2012, 04:16
Respuesta: Re: How to make a register system ( Dialogs, SQLite and rBits ) - by u3games - 23.12.2012, 00:46
Respuesta: How to make a register system ( Dialogs, SQLite and rBits ) - by RiChArD_A - 23.01.2013, 21:47
Re: How to make a register system ( Dialogs, SQLite and rBits ) - by Djean - 24.01.2013, 00:05
Re: How to make a register system ( Dialogs, SQLite and rBits ) - by MyNinja - 24.01.2013, 04:07
Re: How to make a register system ( Dialogs, SQLite and rBits ) - by Madeline - 28.01.2013, 14:54
Re: How to make a register system ( Dialogs, SQLite and rBits ) - by proSeryoga - 08.02.2013, 09:17
Re: How to make a register system ( Dialogs, SQLite and rBits ) - by proSeryoga - 09.03.2013, 07:32
Re: How to make a register system ( Dialogs, SQLite and rBits ) - by Xeiss - 09.03.2013, 10:00
Re: How to make a register system ( Dialogs, SQLite and rBits ) - by Bennyy - 09.03.2013, 10:05
Re: How to make a register system ( Dialogs, SQLite and rBits ) - by proSeryoga - 09.03.2013, 11:03
Re: How to make a register system ( Dialogs, SQLite and rBits ) - by proSeryoga - 10.03.2013, 04:23
Re: How to make a register system ( Dialogs, SQLite and rBits ) - by RVRP - 21.04.2013, 18:13
Re: How to make a register system ( Dialogs, SQLite and rBits ) - by Ayham - 23.11.2013, 13:30
Re: How to make a register system ( Dialogs, SQLite and rBits ) - by Cuhz - 23.11.2013, 14:23
Re: How to make a register system ( Dialogs, SQLite and rBits ) - by Nightangle - 29.07.2014, 07:53
Re: How to make a register system ( Dialogs, SQLite and rBits ) - by freeze98 - 12.10.2014, 14:31
Re: How to make a register system ( Dialogs, SQLite and rBits ) - by naveen - 18.04.2015, 12:22
Re: How to make a register system ( Dialogs, SQLite and rBits ) - by Uberanwar - 25.04.2015, 00:26

Forum Jump:


Users browsing this thread: 1 Guest(s)