08.10.2014, 20:05
Achei um fs de experiencia sу que nao ta mostrando o progressbar e a textdraw alguem me ajuda
Code:
/*Barra de experiencia by Ariel v1*/ #include <a_samp> #include <progress> new Bar:Experiencia[MAX_PLAYERS] = {INVALID_BAR_ID, ...}; new Text:Progreso; #if defined FILTERSCRIPT public OnFilterScriptInit() { print("\n--------------------------------------"); print(" Fs cargado correctamente"); print("--------------------------------------\n"); return 1; } public OnFilterScriptExit() { return 1; } #else main() { } #endif public OnGameModeInit() { new playerid; for (playerid = 0; playerid < GetMaxPlayers(); playerid ++) { Experiencia[playerid] = CreateProgressBar(514.00, 437.00, 119.50, 5.19, -58369, 100.0); } Progreso = TextDrawCreate(525.000000, 424.000000, "Experiencia"); TextDrawBackgroundColor(Progreso, 255); TextDrawFont(Progreso, 1); TextDrawLetterSize(Progreso, 0.500000, 1.000000); TextDrawColor(Progreso, 16711935); TextDrawSetOutline(Progreso, 1); TextDrawSetProportional(Progreso, 1); return 1; } public OnGameModeExit() { TextDrawDestroy(Progreso); return 1; } public OnPlayerRequestSpawn(playerid) { ShowProgressBarForPlayer(playerid,Experiencia[playerid]); TextDrawShowForPlayer(playerid,Progreso); return 1; } public OnPlayerUpdate(playerid) { new Exp; Exp = GetPlayerScore(playerid); ShowProgressBarForPlayer(playerid,Experiencia[playerid]); SetProgressBarValue(Experiencia[playerid],Exp); SetProgressBarMaxValue(Experiencia[playerid],100); UpdateProgressBar(Experiencia[playerid],playerid); if(Exp >= 0 && Exp <= 20) SetProgressBarColor(Experiencia[playerid],0xFF0000FF); if(Exp >= 20 && Exp <= 40) SetProgressBarColor(Experiencia[playerid],0xEA5500FF); if(Exp >= 40 && Exp <= 60) SetProgressBarColor(Experiencia[playerid],0xEAE600FF); if(Exp >= 80 && Exp <= 100) SetProgressBarColor(Experiencia[playerid],0x00E600FF); return 1; }