12.08.2014, 19:41
Hi all...
Sometimes, the password of my players change with other players passwords...
The same thing with names of the three characters...
What can I do?
Here's the code I THINK is wrong.
Thanks!
Sometimes, the password of my players change with other players passwords...
The same thing with names of the three characters...
What can I do?
Here's the code I THINK is wrong.
pawn Код:
forward Cambionome(playerid);
public Cambionome(playerid)
{
format(string, 128, "SELECT * FROM users WHERE username = '%s'", PlayerName3);
mysql_query(string);
new string22[256];
format(string22,sizeof(string22),"INSERT INTO users (username, password,nomepersonaggio1,nomepersonaggio2,nomepersonaggio3) VALUES ('%s', '%s', '%s', '%s,'%s')",PlayerName3, PlayerInfo[playerid][pKey], PlayerInfo[playerid][pNomePersonaggio1],PlayerInfo[playerid][pNomePersonaggio2],PlayerInfo[playerid][pNomePersonaggio3]);
mysql_query(string22);
SetPlayerName(playerid, PlayerInfo[playerid][pNomePersonaggio1]);
//OnPlayerLogin(playerid, PlayerInfo[playerid][pKey]);
NameTag[playerid] = Create3DTextLabel(RPN(playerid), 0xFFFFFFFF, 0, 0, 0, NAME_DRAWDISTANCE, 0, 1 );
Attach3DTextLabelToPlayer(NameTag[playerid], playerid, 0.0, 0.0, 0.2);
if (PlayerInfo[playerid][pTut] == 0)
{
OnPlayerRegister(playerid, PlayerInfo[playerid][pKey]);
ShowPlayerDialog(playerid, SEXMENU, DIALOG_STYLE_MSGBOX, "{00C0FF}Scelta sesso", "{FFFFFF}Sei un uomo o una donna?", "Uomo", "Donna");
PlayerInfo[playerid][pPersSecondario] = 1;
PlayerInfo[playerid][pTut] = 1;
}
else
{
//SpawnPlayer(playerid);
gLoggato[playerid] = 1;
//OnPlayerLogin(playerid, PlayerInfo[playerid][pKey]);
PlayerInfo[playerid][pPersSecondario] = 1;
if(PlayerInfo[playerid][pTipoSpawn] == 0)
{
if(PlayerInfo[playerid][pCrashato] == 1)
{
StopAudioStreamForPlayer(playerid);
TextDrawHideForPlayer(playerid, Textdrawlogin0);
TextDrawHideForPlayer(playerid, Textdrawlogin1);
TextDrawHideForPlayer(playerid, Textdrawlogin2);
TextDrawHideForPlayer(playerid, Textdrawlogin3);
TextDrawHideForPlayer(playerid, Textdrawlogin4);
TextDrawHideForPlayer(playerid, Textdrawlogin5);
TextDrawHideForPlayer(playerid, Textdrawlogin6);
ShowPlayerDialog(playerid, DIALOG_CRASH, DIALOG_STYLE_MSGBOX, "{00D0FF}Crash", "Nella tua ultima sessione di gioco sei crashato.\nDove preferisci spawnare?","Ultima Pos.","Altro");
}
else
{
InterpolateCameraPos(playerid, -1581.887695, 327.298400, 21.836509, -1634.896606, 409.670410, 59.854118, 15000);
InterpolateCameraLookAt(playerid, -1584.259277, 331.332061, 23.598611, -1637.349853, 413.546051, 61.844299, 15000);
SetPlayerVirtualWorld(playerid, 1);
SetPlayerPos(playerid, -1581.887695, 327.298400, 21.836509);
SetTimerEx("VisualeLogin2", 15000, false, "i", playerid);
ShowPlayerDialog(playerid, DIALOG_CRASH, DIALOG_STYLE_MSGBOX, "{00D0FF}Login", "{FFFFFF}Bentornato su One Roleplay!\n{FFFFFF}Dove preferisci spawnare?","Ultima Pos.","Predef.");
StopAudioStreamForPlayer(playerid);
TextDrawHideForPlayer(playerid, Textdrawlogin0);
TextDrawHideForPlayer(playerid, Textdrawlogin1);
TextDrawHideForPlayer(playerid, Textdrawlogin2);
TextDrawHideForPlayer(playerid, Textdrawlogin3);
TextDrawHideForPlayer(playerid, Textdrawlogin4);
TextDrawHideForPlayer(playerid, Textdrawlogin5);
TextDrawHideForPlayer(playerid, Textdrawlogin6);
}
}
else if(PlayerInfo[playerid][pTipoSpawn] == 1)
{
if(PlayerInfo[playerid][pCrashato] == 1)
{
StopAudioStreamForPlayer(playerid);
TextDrawHideForPlayer(playerid, Textdrawlogin0);
TextDrawHideForPlayer(playerid, Textdrawlogin1);
TextDrawHideForPlayer(playerid, Textdrawlogin2);
TextDrawHideForPlayer(playerid, Textdrawlogin3);
TextDrawHideForPlayer(playerid, Textdrawlogin4);
TextDrawHideForPlayer(playerid, Textdrawlogin5);
TextDrawHideForPlayer(playerid, Textdrawlogin6);
ShowPlayerDialog(playerid, DIALOG_CRASH, DIALOG_STYLE_MSGBOX, "{00D0FF}Crash", "Nella tua ultima sessione di gioco sei crashato.\nVuoi tornare alla tua vecchia posizione o spawnare in un altro posto?", "Ultima Pos.", "Altro");
}
else
{
StopAudioStreamForPlayer(playerid);
TextDrawHideForPlayer(playerid, Textdrawlogin0);
TextDrawHideForPlayer(playerid, Textdrawlogin1);
TextDrawHideForPlayer(playerid, Textdrawlogin2);
TextDrawHideForPlayer(playerid, Textdrawlogin3);
TextDrawHideForPlayer(playerid, Textdrawlogin4);
TextDrawHideForPlayer(playerid, Textdrawlogin5);
TextDrawHideForPlayer(playerid, Textdrawlogin6);
InterpolateCameraPos(playerid, -1581.887695, 327.298400, 21.836509, -1634.896606, 409.670410, 59.854118, 15000);
InterpolateCameraLookAt(playerid, -1584.259277, 331.332061, 23.598611, -1637.349853, 413.546051, 61.844299, 15000);
SetPlayerVirtualWorld(playerid, 1);
SetPlayerPos(playerid, -1581.887695, 327.298400, 21.836509);
SetTimerEx("VisualeLogin2", 15000, false, "i", playerid);
ShowPlayerDialog(playerid, DIALOG_CRASH, DIALOG_STYLE_MSGBOX, "{00D0FF}Login", "{FFFFFF}Bentornato su One Roleplay!\n{FFFFFF}Dove preferisci spawnare?","Ultima Pos.","Predef.");
}
}
}
return 1;
}