SA-MP Forums Archive
More advanced register/login system - 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: More advanced register/login system (/showthread.php?tid=356678)



More advanced register/login system - Karl[NDZ] - 04.07.2012

Hey guys, some time ago I had problems with my register/login system but its working now. (btw used this guide https://sampforum.blast.hk/showthread.php?tid=273088)
Now I'm wondering about how you can make them to choose Male or Female after they wrote their password on registering. If you choose Male you will get a male skin (one I pick as standard) and the sampe for the Females.

I would really like to know how you could do this.


Re: More advanced register/login system - Lordzy - 04.07.2012

After registration,you could add a dialog menu regarding the male/female.


Re: More advanced register/login system - Karl[NDZ] - 04.07.2012

I know that, but how do I save what they choose?


Re: More advanced register/login system - LaGrande - 05.07.2012

You can represent the gender in integers as 1= Male and 2= Female for saving.
And them u can show them the dialog with the LIST style for choosing.
And in response of that u set their skin


Re: More advanced register/login system - TheLazySloth - 05.07.2012

Better to use 0 for male and 1 for female... that way you can just set the variable to the listitem

Player[playerid][pGender] = listitem;


Re: More advanced register/login system - Karl[NDZ] - 05.07.2012

What about the skins then?


Re: More advanced register/login system - Snipa - 05.07.2012

Then when they spawn:

pawn Код:
if(Gender[playerid] == 0)
{
    SetPlayerSkin(playerid, 299);
}
else
{
    SetPlayerSkin(playerid, 145);
}
0 == male, 1 == female


Re: More advanced register/login system - Karl[NDZ] - 05.07.2012

Thanks man.

EDIT:
pawn Код:
C:\Users\Meeee\Desktop\Night-Drifterz\gamemodes\nightdrifterz.pwn(533) : error 028: invalid subscript (not an array or too many subscripts): "pSex"
C:\Users\Meeee\Desktop\Night-Drifterz\gamemodes\nightdrifterz.pwn(533) : warning 215: expression has no effect
C:\Users\Meeee\Desktop\Night-Drifterz\gamemodes\nightdrifterz.pwn(533) : error 001: expected token: ";", but found "]"
C:\Users\Meeee\Desktop\Night-Drifterz\gamemodes\nightdrifterz.pwn(533) : error 029: invalid expression, assumed zero
C:\Users\Meeee\Desktop\Night-Drifterz\gamemodes\nightdrifterz.pwn(533) : fatal error 107: too many error messages on one line