23.05.2017, 04:10
Hi,
I have a login register system. When player login it change player skin as system. But when register it not saving :/
Register Player Code:
Spawn Code:
I have a login register system. When player login it change player skin as system. But when register it not saving :/
Register Player Code:
Код:
forward OnPlayerRegister(playerid); public OnPlayerRegister(playerid) { // retrieves the ID generated for an AUTO_INCREMENT column by the sent query Player[playerid][ID] = cache_insert_id(); ShowPlayerDialog(playerid, DIALOG_UNUSED, DIALOG_STYLE_MSGBOX, "Registration", "Account successfully registered, you have been automatically logged in.", "Okay", ""); Player[playerid][IsLoggedIn] = true; Player[playerid][X_Pos] = DEFAULT_POS_X; Player[playerid][Y_Pos] = DEFAULT_POS_Y; Player[playerid][Z_Pos] = DEFAULT_POS_Z; Player[playerid][A_Pos] = DEFAULT_POS_A; SetTimer("spawn", 1000, false); return 1; }
Код:
forward spawn(playerid); public spawn(playerid) { SetPlayerSkin(playerid,299); SetSpawnInfo(playerid, NO_TEAM, 0, Player[playerid][X_Pos], Player[playerid][Y_Pos], Player[playerid][Z_Pos], Player[playerid][A_Pos], 0, 0, 0, 0, 0, 0); SpawnPlayer(playerid); SetPlayerSkin(playerid,299); }