05.11.2018, 20:04
Quote:
Verifica se o dinheiro estб sendo salvo corretamente no arquivo. E use um ResetPlayerMoney antes do GivePlayerMoney.
|
Code:
public OnPlayerConnect(playerid) { TextDrawShowForPlayer(playerid, ImagemEntrada); ResetPlayerMoney(playerid); CARREGAR_CONTA(playerid); return 1; } public OnPlayerDisconnect(playerid, reason) { SALVAR_CONTA(playerid); ResetPlayerMoney(playerid); new xuxu[80]; format(xuxu, sizeof(xuxu), "O jogador {FFF0FF}%s {FFFFFF}saiu do servidor", GetPlayerNome(playerid)); SendClientMessageToAll( Branco , xuxu); return 1; } public OnPlayerRequestSpawn(playerid) return IsPlayerLogged(playerid); IsPlayerLogged(playerid) { if(pInfo[playerid][Logado] == true) { // SetSpawnInfo(playerid, pInfo[playerid][Organizacao], pInfo[playerid][Skin], pInfo[playerid][Pos_Player][0], pInfo[playerid][Pos_Player][1],pInfo[playerid][Pos_Player][2],pInfo[playerid][Pos_Player][3], 0, 0, 0, 0, 0, 0 ); SetSpawnInfo(playerid, pInfo[playerid][Organizacao], pInfo[playerid][Skin],2192.3462,1676.3215,12.3672, 3672, 0, 0, 0, 0, 0, 0 ); SetPlayerInterior(playerid, 0); ResetPlayerMoney(playerid); GivePlayerMoney(playerid, pInfo[playerid][Dinheiro]); SetCameraBehindPlayer(playerid); SpawnPlayer(playerid); } return 1; } public OnPlayerRequestClass(playerid, classid) { if(IsPlayerLogged(playerid)) { SpawnPlayer(playerid); return 1; } return 0; }