i want to change money when a player register, server give 1.000.000$, i want the server give 10.000$
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
Код:
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;
}