It keeps duplicating!
#4

Quote:
Originally Posted by Windows32
Посмотреть сообщение
Hello,
I have this under the OnPlayerConnect callback..
Код:
   else
    {
        ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD,"Registering...","Type your password below to register a new account.","Register","Quit");
    }
    PlayerInfo[playerid][pAdminLevel] = 0;
	PlayerInfo[playerid][pDeaths] = 0;
	GivePlayerMoney(playerid, 2500);
	PlayerInfo[playerid][pBanned] = 0;
	PlayerInfo[playerid][pScore] = 0;
	PlayerInfo[playerid][pKills] = 0;
	PlayerInfo[playerid][Team] = -1;
But it keeps duplicating the money and I can't sort it out!
So your trying to make a new playerfile with that? If you are you need to put that under dialog responce and had it save them to a file then reloaded to your player array. heres all mine under my register response
pawn Код:
new INI:File = INI_Open(UserPath(playerid));
                INI_SetTag(File,"data");
                INI_WriteInt(File,"Password",udb_hash(inputtext));
                INI_WriteInt(File,"Cash",0);
                INI_WriteInt(File,"Admin",0);
                INI_WriteInt(File,"Kills",0);
                INI_WriteInt(File,"Deaths",0);
                INI_WriteInt(File,"Score",0);
                INI_WriteInt(File,"Online",1);
                INI_WriteInt(File,"Banned",0);
                INI_WriteInt(File,"Bans",0);
                INI_WriteInt(File,"Vip",0);
That is how i write a new player file then i reopen it to the player array and it works great. I am using y_ini for file saving.
This is the tut i used to make my system. https://sampforum.blast.hk/showthread.php?tid=273088
Reply


Messages In This Thread
It keeps duplicating! - by Elysian` - 24.04.2012, 18:48
Re: It keeps duplicating! - by Elysian` - 24.04.2012, 19:51
Re: It keeps duplicating! - by Elysian` - 25.04.2012, 15:34
Re: It keeps duplicating! - by nickdodd25 - 25.04.2012, 16:14
Re: It keeps duplicating! - by MadeMan - 25.04.2012, 16:27
Re: It keeps duplicating! - by Elysian` - 25.04.2012, 16:41
Re: It keeps duplicating! - by ReneG - 25.04.2012, 22:04

Forum Jump:


Users browsing this thread: 1 Guest(s)