SA-MP Forums Archive
Why? - 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: Why? (/showthread.php?tid=306572)



Why? - Dziugsas - 27.12.2011

Hello friends , wanted to ask you what is wrong.When i register to my server and choose gender = female i get male skin but when i relog i female skin.

My LOADING

pawn Код:
pInfo[playerid][skinas]=dini_Int(file,"Skinas"); //Skin
    pInfo[playerid][lytis]=dini_Int(file,"Lytis"); //Gender
SAVING

pawn Код:
dini_IntSet(file, "Skinas", GetPlayerSkin(playerid)); //Skin
    dini_IntSet(file,"Lytis",pInfo[playerid][lytis]); //Gender
Gender selection

When player registers
pawn Код:
ShowPlayerDialog(playerid,3,DIALOG_STYLE_MSGBOX,"Lytis","{FFFFFF}Jus esate...?","Vyras","Moteris");
The Gender code
pawn Код:
if(dialogid == 3)
    {
        if(response)
        {
        SendClientMessage(playerid,GREEN,"Jus esate vyras."); // You are male
        SetPlayerSkin(playerid,188);
        pInfo[playerid][lytis]=1; //Gender
        pInfo[playerid][skinas]=188; //Skin
        }
       
        if(!response)
        {
        SendClientMessage(playerid,GREEN,"Jus esate moteris."); // You are female
        SetPlayerSkin(playerid,93);
        pInfo[playerid][lytis]=2; //Gender
        pInfo[playerid][skinas]=93; //Skin
        return 1;
        }



Re: Why? - Seven_of_Nine - 27.12.2011

Wow weird.. I see no mistake..

EDIT: Try like so
Код:
if(response) {
blabla
} else {
(blabla)
}
I'd try every single option. D


Re: Why? - wildcookie007 - 27.12.2011

I think you put the wrong skin then.. try switching them. in other language: apkeisk skinus


Re: Why? - Seven_of_Nine - 27.12.2011

Quote:
Originally Posted by wildcookie007
Посмотреть сообщение
I think you put the wrong skin then.. try switching them. in other language: apkeisk skinus
Skin IDs are right. 188 is swmyst, male. 93 is wfyst, female.


Re : Why? - Dziugsas - 27.12.2011

With Gender code everything is ok its because of this

pawn Код:
public OnGameModeInit()
{
   
    AddPlayerClass(188,-90.0319,1229.1438,19.7422,179.0934,0,0,0,0,0,0); the MAle skin
    AddPlayerClass(174,-90.0319,1229.1438,19.7422,179.0934,0,0,0,0,0,0);
    AddPlayerClass(93,-90.0319,1229.1438,19.7422,179.0934,0,0,0,0,0,0);