[CAMPANIE STAFF]Cautam moderatori si designeri activi!
Welcome to WTFCS Community Forums!
Servere gaming la super-preturi! [HOSTING SERVICE]
-->






[PAWN] Level Bar
Author : mihay111, Category : Tutoriale, 0 Replyes, 723 Views
EVALUATE THIS TOPIC
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
1 Guest(s)
Moderator
     
577
POSTS
452
THREADS
190
REPUTATION
Male
Sex

WtfCs Coins: 0.15[w]

Suit Member
04-18-2020, 10:03 PM
#1
Cum sa creezi un Level Bar. Creat de Carter


Code:
#include <a_samp>           // includurile sunt obigatorii definite in gamemode-ul d-vs.
#include <playerprogress>


public OnPlayerDisconnect(playerid, reason)
{
       DestroyPlayerProgressBar(playerid, HudProgress[playerid][0]); // la deconectarea jucatorului, levelbar-ul va disparea.
   }
   return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{  

   case DIALOG_HUD_3:
       {
           if(!response) return 1;
           switch(pInfo[playerid][pShowBarLevel])
           {
               case 0: pInfo[playerid][pShowBarLevel] = 1, SendClientMessage(playerid, COLOR_ORANGE, "(Progress Level): Ai activat optiunea 'Progress Level'."), ShowPlayerProgressBar(playerid, HudProgress[playerid][0]), UpdateProgress(playerid, 0);
               case 1: pInfo[playerid][pShowBarLevel] = 0, SendClientMessage(playerid, COLOR_ORANGE, "(Progress Level): Ai dezactivat optiunea 'Progress Level'."), HidePlayerProgressBar(playerid, HudProgress[playerid][0]), PlayerTextDrawHide(playerid, HudTD[0]);
           }
       }
   return 1;
}
forward FinishReg(playerid);
public FinishReg(playerid)
{
   HudProgress[playerid][0] = CreatePlayerProgressBar(playerid, 513.00, 150.00, 85.50, 2.50, 0x00FF00FF, 100.0);//levelbar
   switch(pInfo[playerid][pShowBarLevel]) // Aici, afiseaza level bar-ul.
   {
       case 0: HidePlayerProgressBar(playerid, HudProgress[playerid][0]); // Aici va ascunde textul.
       case 1: UpdateProgress(playerid, 0), ShowPlayerProgressBar(playerid, HudProgress[playerid][0]), UpdateProgress(playerid, 0); // Va progresa in functie de respect point / level.
   }
   return 1;
}
Va arata asa: You are not allowed to view links. Register or Login to view.


Forum Jump: