18.07.2017, 18:10
a linha q ta dando warning e essa:
esse e o sistema que eu uso:
Quote:
|
Player[ playerid ][ pSede ] = DOF2_GetInt( GetPlayerArquivo(playerid),"pSede"); |
Quote:
|
enum Player_Data { bool: pConectado, pIdioma, pAdmin, pAviso, bool: pMute, bool: pBlockPM, pChat, pBackpack, pSlots, pFome, pSede, pRadiation, pReputation, pExp, pLevel, pRespawn, pSangrando, pQuebrado, pTemGPS, pTemColete, pTemCapacete }; new pInfo[MAX_PLAYERS][Player_Data]; |
Quote:
|
public OnPlayerUpdate(playerid) { if(!IsPlayerNPC(playerid) && IsPlayerConnected(playerid)) { if(pInfo[playerid][pConectado] == true) { new str[200]; format(str, sizeof(str), "[~y~%s~w~]", PegarNome(playerid)); PlayerTextDrawSetString(playerid, PLAYER_HUD[playerid][22], str); format(str, sizeof(str), "%.0i%", pInfo[playerid][pFome]); PlayerTextDrawSetString(playerid, PLAYER_HUD[playerid][9], str); format(str, sizeof(str), "%.0i%", pInfo[playerid][pSede]); PlayerTextDrawSetString(playerid, PLAYER_HUD[playerid][13], str); if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) { new vehicleid = GetPlayerVehicleID(playerid); format(str, sizeof(str), "Fuel: ~r~%i~n~~w~Engine: %s", vInfo[vehicleid][vCombustivel], vInfo[vehicleid][vTemMotor] ? ("~g~Yes") : ("~r~None")); PlayerTextDrawSetString(playerid, VEH_HUD[playerid][3], str); } } } return 1; } |
Quote:
|
public AtualizarSede() { foreach(Player, i) { if(pInfo[i][pConectado] == true && IsPlayerConnected(i) && !IsPlayerNPC(i)) { if(pInfo[i][pSede] > 0) pInfo[i][pSede]--; if(pInfo[i][pSede] == 5) SendClientMessage(i, COR_AMARELO, Translate(pInfo[i][pIdioma], "[Sede]: Voce esta ficando com Sede, beba alguma coisa ou comecara a perder vida.", "[THIRST]: You're getting thirsty, drink something or will begin to lose health.")); if(pInfo[i][pSede] == 0) { new Float:health; GetPlayerHealth(i, health), SetPlayerHealth(i, health-10); SetPlayerDrunkLevel(i, 4500); } } } return 1; } |
Quote:
|
stock ResetarPlayer(playerid) { ResetPlayerInventory(playerid); ResetPlayerWeapons(playerid); if(pInfo[playerid][pSangrando] == 1) KillTimer(SangueTimer[playerid]); pInfo[playerid][pChat] = 0; pInfo[playerid][pQuebrado] = 0; pInfo[playerid][pSangrando] = 0; pInfo[playerid][pBackpack] = 5; pInfo[playerid][pFome] = 80; pInfo[playerid][pSede] = 80; pInfo[playerid][pRadiation] = 0; AddItem(playerid, "Water Canteen", 1); AddItem(playerid, "Bandage", 1); return 1; } |

