Money start
#1

Hi guys,
i want to change money when a player register, server give 1.000.000$, i want the server give 10.000$
The server is MYSQL
Reply
#2

show the code where player register
something like public OnPlayerRegister ? ! whatever you have post that code here or search for it then there will be GivePlayerMoney(playerid, 1000000); change it to whatever money you want to give
Reply
#3

This is Public OnPlayerRegister
Код:
public OnPlayerRegister(playerid, password[]) // 
{
	if(IsPlayerConnected(playerid))
	{
		MySQLCheckConnection();
		new playername3[MAX_PLAYER_NAME];
		GetPlayerName(playerid, playername3, sizeof(playername3));
		new newaccountsqlid = MySQLCreateAccount(playername3, password, playerid);
		if (newaccountsqlid != 0)
		{
			new loginstring[128];
			PlayerData[playerid][pSQLID] = newaccountsqlid;
			strmid(PlayerData[playerid][pKey], password, 0, strlen(password), 255);
			OnPlayerUpdateEx(playerid);
            format(loginstring,sizeof(loginstring),"Bine ai venit, %s\nAcest nick este inregistrat.\nTe rog logheaza-te:",playername3);
			ShowPlayerDialog(playerid,12346,DIALOG_STYLE_PASSWORD,"{1E90FF}L{FFFFFF}ogheaza-te",loginstring,"Login","Exit");
			return 1;
		}
		else
		{
			gPlayerAccount[playerid] = 0;
 			new regstring[128];
			new regname[64];
			GetPlayerName(playerid,regname,sizeof(regname));
			format(regstring,sizeof(regstring),"Bine ai venit, %s\nNu ai cont.\nTe rog inregistreaza-te:",regname);
			ShowPlayerDialog(playerid,12345,DIALOG_STYLE_PASSWORD,"{1E90FF}I{FFFFFF}nregistreaza-te",regstring,"Register","Exit");
		}
	}
	return 0;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)