More advanced register/login system
#1

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.
Reply
#2

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

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

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
Reply
#5

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;
Reply
#6

What about the skins then?
Reply
#7

Then when they spawn:

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

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)