S4K Posted April 13, 2017 Posted April 13, 2017 (edited) adaugam la variabile: Quote new PlayerText: HudTD[3]; new PlayerBar:HudProgress[MAX_PLAYERS][3]; adaugam la playertextdraws Quote HudTD[0] = CreatePlayerTextDraw(playerid, 87.999992, 269.644470, "Level: 5-6 (0/5 RP)"); PlayerTextDrawLetterSize(playerid, HudTD[0], 0.176666, 0.865778); PlayerTextDrawAlignment(playerid, HudTD[0], 2); PlayerTextDrawColor(playerid, HudTD[0], -1); PlayerTextDrawSetShadow(playerid, HudTD[0], 1); PlayerTextDrawSetOutline(playerid, HudTD[0], 1); PlayerTextDrawBackgroundColor(playerid, HudTD[0], 118); PlayerTextDrawFont(playerid, HudTD[0], 1); PlayerTextDrawSetProportional(playerid, HudTD[0], 1); PlayerTextDrawSetShadow(playerid, HudTD[0], 1); HudTD[1] = CreatePlayerTextDraw(playerid, 88.000007, 304.074096, "Raport: 1-5 (0/2)"); PlayerTextDrawLetterSize(playerid, HudTD[1], 0.176666, 0.865778); PlayerTextDrawAlignment(playerid, HudTD[1], 2); PlayerTextDrawColor(playerid, HudTD[1], -1); PlayerTextDrawSetShadow(playerid, HudTD[1], 1); PlayerTextDrawSetOutline(playerid, HudTD[1], 1); PlayerTextDrawBackgroundColor(playerid, HudTD[1], 118); PlayerTextDrawFont(playerid, HudTD[1], 1); PlayerTextDrawSetProportional(playerid, HudTD[1], 1); PlayerTextDrawSetShadow(playerid, HudTD[1], 1); HudTD[2] = CreatePlayerTextDraw(playerid, 87.000007, 235.214844, "Vehicles: 50/50"); PlayerTextDrawLetterSize(playerid, HudTD[2], 0.176666, 0.865778); PlayerTextDrawAlignment(playerid, HudTD[2], 2); PlayerTextDrawColor(playerid, HudTD[2], -1); PlayerTextDrawSetShadow(playerid, HudTD[2], 1); PlayerTextDrawSetOutline(playerid, HudTD[2], 1); PlayerTextDrawBackgroundColor(playerid, HudTD[2], 118); PlayerTextDrawFont(playerid, HudTD[2], 1); PlayerTextDrawSetProportional(playerid, HudTD[2], 1); PlayerTextDrawSetShadow(playerid, HudTD[2], 1); adaugam la pinfo: Quote pShowHud[6], pe urma la function: Quote function DestroyProgress(playerid, bar) { HidePlayerProgressBar(playerid, HudProgress[playerid][bar]); PlayerTextDrawHide(playerid, HudTD[bar]); return 1; } function UpdateProgress(playerid, bar) { new string[64]; switch(bar) { case 0: { format(string, sizeof(string), "Level: %d-%d (%d/%d RP)", PlayerInfo[playerid][pLevel], PlayerInfo[playerid][pLevel]+1, PlayerInfo[playerid][pExp], PlayerInfo[playerid][pLevel]*levelexp); PlayerTextDrawSetString(playerid, HudTD[bar], string); PlayerTextDrawShow(playerid, HudTD[bar]); SetPlayerProgressBarMaxValue(playerid, HudProgress[playerid][bar], PlayerInfo[playerid][pLevel]*levelexp); SetPlayerProgressBarValue(playerid, HudProgress[playerid][bar], PlayerInfo[playerid][pExp]); SetPlayerProgressBarColor(playerid, HudProgress[playerid][bar], GetHudColor(PlayerInfo[playerid][pShowHud][3])); } case 1: { if(PlayerInfo[playerid][pMember] == 0) { PlayerInfo[playerid][pShowHud][4] = 0; UpdateVar(playerid, "ShowHud4", 0); SCM(playerid, COLOR_GRAD2, "Optiunea de a vedea progresul raportului a fost dezactivata automat!"); DestroyProgress(playerid, bar); return 1; } if(PlayerInfo[playerid][pRank] >= 5) format(string, sizeof(string), "Raport: %d (%d/%d)", PlayerInfo[playerid][pRank], PlayerInfo[playerid][pCommands], GetNeedPointsR(playerid)); else format(string, sizeof(string), "Raport: %d-%d (%d/%d)", PlayerInfo[playerid][pRank], PlayerInfo[playerid][pRank]+1, PlayerInfo[playerid][pCommands], GetNeedPointsR(playerid)); PlayerTextDrawSetString(playerid, HudTD[bar], string); PlayerTextDrawShow(playerid, HudTD[bar]); SetPlayerProgressBarMaxValue(playerid, HudProgress[playerid][bar], GetNeedPointsR(playerid)); SetPlayerProgressBarValue(playerid, HudProgress[playerid][bar], PlayerInfo[playerid][pCommands]); SetPlayerProgressBarColor(playerid, HudProgress[playerid][bar], GetHudColor(PlayerInfo[playerid][pShowHud][4])); } case 2: { format(string, sizeof(string), "Vehicles: %d/%d", GetVehicles(playerid), GetSlots(playerid)); PlayerTextDrawSetString(playerid, HudTD[bar], string); PlayerTextDrawShow(playerid, HudTD[bar]); SetPlayerProgressBarMaxValue(playerid, HudProgress[playerid][bar], GetSlots(playerid)); SetPlayerProgressBarValue(playerid, HudProgress[playerid][bar], GetVehicles(playerid)); SetPlayerProgressBarColor(playerid, HudProgress[playerid][bar], GetHudColor(PlayerInfo[playerid][pShowHud][5])); } } ShowPlayerProgressBar(playerid, HudProgress[playerid][bar]); return 1; } adaugam la OnPlayerDisconnect: Quote DestroyPlayerProgressBar(playerid, HudProgress[playerid][0]); DestroyPlayerProgressBar(playerid, HudProgress[playerid][1]); DestroyPlayerProgressBar(playerid, HudProgress[playerid][2]); adaugam la setplayerunjail: Quote if(PlayerInfo[pShowHud][3] != 0) UpdateProgress(i, 0); if(PlayerInfo[pShowHud][4] != 0) UpdateProgress(i, 1); if(PlayerInfo[pShowHud][5] != 0) UpdateProgress(i, 2); la comanda /hud adaugam astea 3, ultimele 3: Quote if(item3 != 0) format(string, 1024, "{FFFFFF}Progres Level: %s\n", HudName[item3]); else format(string, 1024, "{FFFFFF}Progres Level: {FF9E9E}Dezactivat\n", HudName[item3]); strcat(string2, string); if(item4 != 0) format(string, 1024, "{FFFFFF}Progres Raport: %s\n", HudName[item4]); else format(string, 1024, "{FFFFFF}Progres Raport: {FF9E9E}Dezactivat\n", HudName[item4]); strcat(string2, string); if(item5 != 0) format(string, 1024, "{FFFFFF}Progres Vehicles: %s\n", HudName[item5]); else format(string, 1024, "{FFFFFF}Progres Vehicles: {FF9E9E}Dezactivat\n", HudName[item5]); strcat(string2, string); la onplayerlogin Quote HudProgress[playerid][0] = CreatePlayerProgressBar(playerid,52.00, 282.00, 72.50, 4.19, 0x00FF00FF, 100.0); HudProgress[playerid][1] = CreatePlayerProgressBar(playerid,52.00, 316.00, 72.50, 4.19, 0x00FF00FF, 100.0); HudProgress[playerid][2] = CreatePlayerProgressBar(playerid,52.00, 248.00, 72.50, 4.19, 0x00FF00FF, 100.0); la dialog_hud: Quote case 3: ShowPlayerDialog(playerid,DIALOG_HUDSELECT,DIALOG_STYLE_LIST,"Optiuni HUD: Progres level","{FF9E9E}Dezactiveaza\n{B8BFC2}Gri\n{FF0000}Rosu\n{00FF2F}Verde\n{0022FF}Albastru\n{FFFB00}Galben\n{8000FF}Mov","Ok","Inapoi"); case 4: ShowPlayerDialog(playerid,DIALOG_HUDSELECT,DIALOG_STYLE_LIST,"Optiuni HUD: Progres raport","{FF9E9E}Dezactiveaza\n{B8BFC2}Gri\n{FF0000}Rosu\n{00FF2F}Verde\n{0022FF}Albastru\n{FFFB00}Galben\n{8000FF}Mov","Ok","Inapoi"); case 5: ShowPlayerDialog(playerid,DIALOG_HUDSELECT,DIALOG_STYLE_LIST,"Optiuni HUD: Progres vehicles","{FF9E9E}Dezactiveaza\n{B8BFC2}Gri\n{FF0000}Rosu\n{00FF2F}Verde\n{0022FF}Albastru\n{FFFB00}Galben\n{8000FF}Mov","Ok","Inapoi"); la dialog_hudselect: Quote case 3: { PlayerInfo[playerid][pShowHud][3] = listitem; if(listitem == 0) DestroyProgress(playerid, 0); else UpdateProgress(playerid, 0); format(query, sizeof(query), "UPDATE `users` SET `ShowHud3`='%d' WHERE `ID`='%d'", PlayerInfo[playerid][pShowHud][3], PlayerInfo[playerid][pSQLID]); mysql_query(SQL, query); } case 4: { PlayerInfo[playerid][pShowHud][4] = listitem; if(listitem == 0) DestroyProgress(playerid, 1); else UpdateProgress(playerid, 1); format(query, sizeof(query), "UPDATE `users` SET `ShowHud4`='%d' WHERE `ID`='%d'", PlayerInfo[playerid][pShowHud][4], PlayerInfo[playerid][pSQLID]); mysql_query(SQL, query); } case 5: { PlayerInfo[playerid][pShowHud][5] = listitem; if(listitem == 0) DestroyProgress(playerid, 2); else UpdateProgress(playerid, 2); format(query, sizeof(query), "UPDATE `users` SET `ShowHud5`='%d' WHERE `ID`='%d'", PlayerInfo[playerid][pShowHud][5], PlayerInfo[playerid][pSQLID]); mysql_query(SQL, query); } poza: Edited April 13, 2017 by s4uriK Serverul meu de Discord: Click aici
Mr.Floryn Posted April 13, 2017 Posted April 13, 2017 Acum 54 minute, s4uriK a spus: adaugam la variabile: adaugam la playertextdraws adaugam la pinfo: pe urma la function: adaugam la OnPlayerDisconnect: adaugam la setplayerunjail: la comanda /hud adaugam astea 3, ultimele 3: la onplayerlogin la dialog_hud: la dialog_hudselect: poza: Bv fratica <3 :* 1
S4K Posted April 13, 2017 Author Posted April 13, 2017 11 minutes ago, Mr.Floryn said: Bv fratica <3 :* Ms frate <3 :* Serverul meu de Discord: Click aici
InceMan Posted April 14, 2017 Posted April 14, 2017 bun tutorial felicitari! FiveGame Lands Pawno Developer, Mapping , Scripter Since 2016
S4K Posted April 17, 2017 Author Posted April 17, 2017 On 14.04.2017 at 4:15 PM, Geani said: bun tutorial felicitari! Ms <3 Serverul meu de Discord: Click aici
BuNiCu-RP Posted April 18, 2017 Posted April 18, 2017 La 13.04.2017 la 20:14, s4uriK a spus: adaugam la variabile: adaugam la playertextdraws adaugam la pinfo: pe urma la function: adaugam la OnPlayerDisconnect: adaugam la setplayerunjail: la comanda /hud adaugam astea 3, ultimele 3: la onplayerlogin la dialog_hud: la dialog_hudselect: poza: Frumos tutorial, rezultatul final ma da pe spate. Cand mai faci un tutorial, nu uita de limba romana si de cei newbie
Uzzi25.. Posted May 29, 2017 Posted May 29, 2017 Bv frate Download gamemode de la 0: gamemode de la 0 instagram: @instauzzi25
mrtea Posted June 13, 2017 Posted June 13, 2017 Si unde este acel function? De ex la mine in gamemode nu este ?!
Mister Posted June 13, 2017 Posted June 13, 2017 7 hours ago, mrtea said: Si unde este acel function? De ex la mine in gamemode nu este ?! adaugi la finalul gamemodeului sunt niste functii libere care trebuie adaugate la final __ ____ __ / |/ (_)____/ /____ _____ / /|_/ / / ___/ __/ _ \/ ___/ / / / / (__ ) /_/ __/ / /_/ /_/_/____/\__/\___/_/ SERVICII SCRIPTING DE CALITATE Pagina Scripting pawn
mrtea Posted June 13, 2017 Posted June 13, 2017 3 hours ago, Mister said: adaugi la finalul gamemodeului sunt niste functii libere care trebuie adaugate la final imi da undefined function!
Mister Posted June 13, 2017 Posted June 13, 2017 3 minutes ago, mrtea said: imi da undefined function! adaugi asta la inceputul gamemodeului dupa #includeuri #define function%0(%1) forward%0(%1); public%0(%1) __ ____ __ / |/ (_)____/ /____ _____ / /|_/ / / ___/ __/ _ \/ ___/ / / / / (__ ) /_/ __/ / /_/ /_/_/____/\__/\___/_/ SERVICII SCRIPTING DE CALITATE Pagina Scripting pawn
mrtea Posted June 22, 2017 Posted June 22, 2017 Numai eu nu am reusit sa fac aceasta nebunie? imi da o gramada de errori la include-uri daca fac exact ca aici
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now