money-color | Menja boju igracevog novca

Započeo realplaya, Oktobar 31, 2021, 13:05:56 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Tip: Include
Slike ili Video: Nije potrebno.
Opis i dodatne informacije: Napravio sam jedan mali include koji menja boju igracevog novca (gore desno u hudu). Ako imate bilo kakve zamerke, predloge ili pohvale mozete mi to napisati na gitu, pozeljno je na engleskom jeziku, hvala.
Download link: https://github.com/Madd301/money-color
Scan link: GitHub
Credits: Madd, Y_Less, SA-MP Team
Potrebno: YSI(y_hooks)

Ubacivanje:
Preuzmete fajlove sa github-a, ubacite money-color.inc u root-folder\pawno\include, zatim u main skripti pri vrhu dodate sledece:
[pawn]#include <money-color>[/pawn]

Koriscenje:
Kada ste to uradili mozete normalno koristiti money-color include, boju novca menjate tako sto je jednostavno pri vrhu svoje skripte definisete:
[pawn]#define MONEY_BAR_COLOR hex-boja[/pawn]
https://discord.io/westmont
Westmont Roleplay — A continuation of the San Andreas singleplayer storymode.
SA-MP 0.3.DL gamemode with custom models.



Zasto idioti krecu da koriste github, drzite se ovog foruma, ovde ostavljajte svoja sranja

xddddd
[pawn]hook OnPlayerUpdate(playerid)
{
   new string[16];
   if(GetPlayerMoney(playerid) == 0)
   {
       PlayerTextDrawShow(playerid, playerMoney[playerid]);
      format(string, sizeof(string), "$0000000%d", GetPlayerMoney(playerid));
      PlayerTextDrawSetString(playerid, playerMoney[playerid], string);
   }
   else if(GetPlayerMoney(playerid) > 0 && GetPlayerMoney(playerid) < 10)
   {
       PlayerTextDrawShow(playerid, playerMoney[playerid]);
      format(string, sizeof(string), "$0000000%d", GetPlayerMoney(playerid));
      PlayerTextDrawSetString(playerid, playerMoney[playerid], string);
   }
   else if(GetPlayerMoney(playerid) >= 10 && GetPlayerMoney(playerid) < 100)
   {
       PlayerTextDrawShow(playerid, playerMoney[playerid]);
      format(string, sizeof(string), "$000000%d", GetPlayerMoney(playerid));
      PlayerTextDrawSetString(playerid, playerMoney[playerid], string);
   }
   else if(GetPlayerMoney(playerid) >= 100 && GetPlayerMoney(playerid) < 1000)
   {
       PlayerTextDrawShow(playerid, playerMoney[playerid]);
      format(string, sizeof(string), "$00000%d", GetPlayerMoney(playerid));
      PlayerTextDrawSetString(playerid, playerMoney[playerid], string);
   }
   else if(GetPlayerMoney(playerid) >= 1000 && GetPlayerMoney(playerid) < 10000)
   {
       PlayerTextDrawShow(playerid, playerMoney[playerid]);
      format(string, sizeof(string), "$0000%d", GetPlayerMoney(playerid));
      PlayerTextDrawSetString(playerid, playerMoney[playerid], string);
   }
   else if(GetPlayerMoney(playerid) >= 10000 && GetPlayerMoney(playerid) < 100000)
   {
       PlayerTextDrawShow(playerid, playerMoney[playerid]);
      format(string, sizeof(string), "$000%d", GetPlayerMoney(playerid));
      PlayerTextDrawSetString(playerid, playerMoney[playerid], string);
   }
   else if(GetPlayerMoney(playerid) >= 100000 && GetPlayerMoney(playerid) < 1000000)
   {
       PlayerTextDrawShow(playerid, playerMoney[playerid]);
      format(string, sizeof(string), "$00%d", GetPlayerMoney(playerid));
      PlayerTextDrawSetString(playerid, playerMoney[playerid], string);
   }
   else if(GetPlayerMoney(playerid) >= 1000000 && GetPlayerMoney(playerid) < 10000000)
   {
       PlayerTextDrawShow(playerid, playerMoney[playerid]);
      format(string, sizeof(string), "$0%d", GetPlayerMoney(playerid));
      PlayerTextDrawSetString(playerid, playerMoney[playerid], string);
   }
   else if(GetPlayerMoney(playerid) >= 10000000 && GetPlayerMoney(playerid) < 100000000)
   {
       PlayerTextDrawShow(playerid, playerMoney[playerid]);
      format(string, sizeof(string), "$%d", GetPlayerMoney(playerid));
      PlayerTextDrawSetString(playerid, playerMoney[playerid], string);
   }
   else if(GetPlayerMoney(playerid) < 0 && GetPlayerMoney(playerid) > -100000000)
   {
      PlayerTextDrawHide(playerid, playerMoney[playerid]);
   }
   return 1;
}[/pawn]

Citat: akul poslato Oktobar 31, 2021, 13:44:23 POSLE PODNE
dobar
Hvala

Citat: PazzOnee poslato Oktobar 31, 2021, 14:09:37 POSLE PODNE
Zasto idioti krecu da koriste github, drzite se ovog foruma, ovde ostavljajte svoja sranja
Idioti? Ne lozi se decko..

Citat: Galardo poslato Oktobar 31, 2021, 16:17:53 POSLE PODNE
xddddd
[pawn]hook OnPlayerUpdate(playerid)
{
   new string[16];
   if(GetPlayerMoney(playerid) == 0)
   {
       PlayerTextDrawShow(playerid, playerMoney[playerid]);
      format(string, sizeof(string), "$0000000%d", GetPlayerMoney(playerid));
      PlayerTextDrawSetString(playerid, playerMoney[playerid], string);
   }
   else if(GetPlayerMoney(playerid) > 0 && GetPlayerMoney(playerid) < 10)
   {
       PlayerTextDrawShow(playerid, playerMoney[playerid]);
      format(string, sizeof(string), "$0000000%d", GetPlayerMoney(playerid));
      PlayerTextDrawSetString(playerid, playerMoney[playerid], string);
   }
   else if(GetPlayerMoney(playerid) >= 10 && GetPlayerMoney(playerid) < 100)
   {
       PlayerTextDrawShow(playerid, playerMoney[playerid]);
      format(string, sizeof(string), "$000000%d", GetPlayerMoney(playerid));
      PlayerTextDrawSetString(playerid, playerMoney[playerid], string);
   }
   else if(GetPlayerMoney(playerid) >= 100 && GetPlayerMoney(playerid) < 1000)
   {
       PlayerTextDrawShow(playerid, playerMoney[playerid]);
      format(string, sizeof(string), "$00000%d", GetPlayerMoney(playerid));
      PlayerTextDrawSetString(playerid, playerMoney[playerid], string);
   }
   else if(GetPlayerMoney(playerid) >= 1000 && GetPlayerMoney(playerid) < 10000)
   {
       PlayerTextDrawShow(playerid, playerMoney[playerid]);
      format(string, sizeof(string), "$0000%d", GetPlayerMoney(playerid));
      PlayerTextDrawSetString(playerid, playerMoney[playerid], string);
   }
   else if(GetPlayerMoney(playerid) >= 10000 && GetPlayerMoney(playerid) < 100000)
   {
       PlayerTextDrawShow(playerid, playerMoney[playerid]);
      format(string, sizeof(string), "$000%d", GetPlayerMoney(playerid));
      PlayerTextDrawSetString(playerid, playerMoney[playerid], string);
   }
   else if(GetPlayerMoney(playerid) >= 100000 && GetPlayerMoney(playerid) < 1000000)
   {
       PlayerTextDrawShow(playerid, playerMoney[playerid]);
      format(string, sizeof(string), "$00%d", GetPlayerMoney(playerid));
      PlayerTextDrawSetString(playerid, playerMoney[playerid], string);
   }
   else if(GetPlayerMoney(playerid) >= 1000000 && GetPlayerMoney(playerid) < 10000000)
   {
       PlayerTextDrawShow(playerid, playerMoney[playerid]);
      format(string, sizeof(string), "$0%d", GetPlayerMoney(playerid));
      PlayerTextDrawSetString(playerid, playerMoney[playerid], string);
   }
   else if(GetPlayerMoney(playerid) >= 10000000 && GetPlayerMoney(playerid) < 100000000)
   {
       PlayerTextDrawShow(playerid, playerMoney[playerid]);
      format(string, sizeof(string), "$%d", GetPlayerMoney(playerid));
      PlayerTextDrawSetString(playerid, playerMoney[playerid], string);
   }
   else if(GetPlayerMoney(playerid) < 0 && GetPlayerMoney(playerid) > -100000000)
   {
      PlayerTextDrawHide(playerid, playerMoney[playerid]);
   }
   return 1;
}[/pawn]
Mogu li dobiti konkretan odgovor?
https://discord.io/westmont
Westmont Roleplay — A continuation of the San Andreas singleplayer storymode.
SA-MP 0.3.DL gamemode with custom models.

Citat: Terza Lazarevic poslato Oktobar 31, 2021, 13:45:36 POSLE PODNE
%08d formatiranje
hook GivePlayerMoney
Vidis, toga se nisam setio...  :( :o
https://discord.io/westmont
Westmont Roleplay — A continuation of the San Andreas singleplayer storymode.
SA-MP 0.3.DL gamemode with custom models.

Citat: Matt. poslato Oktobar 31, 2021, 16:28:12 POSLE PODNE
Mogu li dobiti konkretan odgovor?
Sta ti bre nije jasno? Jesi bre prso da koristis OnPlayerUpdate za takvu glupost?

Citat: Deleted User poslato Oktobar 31, 2021, 16:57:40 POSLE PODNE
Sta ti bre nije jasno? Jesi bre prso da koristis OnPlayerUpdate za takvu glupost?
Sta bi mogao koristiti za ovakvu stvar?
https://discord.io/westmont
Westmont Roleplay — A continuation of the San Andreas singleplayer storymode.
SA-MP 0.3.DL gamemode with custom models.


Citat: Galardo poslato Oktobar 31, 2021, 17:50:09 POSLE PODNE
Ono kada kazes u smislu da si shvatio, a ustvari samo pratis.
Ne shvatam sta pokusavas da kazes... Ako imate nesto da kazete konkretno recite, ne tako...
https://discord.io/westmont
Westmont Roleplay — A continuation of the San Andreas singleplayer storymode.
SA-MP 0.3.DL gamemode with custom models.

Nije mi jasno sto ovo na github obajvjuljes al ajd, iskr nista specijalno...Ali posluzit ce

Tema : 8 / 10 not bed
SPEED HACK (C++) https://github.com/nouddy/samp-speed-hack
Reliant GameMode (open.mp) https://github.com/nouddy/reliant-omp
SA:MP Landing Page https://github.com/nouddy/samp-landing-page


Kolko drama ima u 7 grama

Citat: ᴅ ɪ ɴ ᴏ poslato Oktobar 31, 2021, 19:29:40 POSLE PODNE
Nije mi jasno sto ovo na github obajvjuljes al ajd, iskr nista specijalno...Ali posluzit ce

Tema : 8 / 10 not bed
Ne znam zasto ne... Kakve veze to ima sa icim na svetu? To je kao da me pitas zasto sam uploadovao nesto na mediafire, eto.. Hvala svakako.
https://discord.io/westmont
Westmont Roleplay — A continuation of the San Andreas singleplayer storymode.
SA-MP 0.3.DL gamemode with custom models.

Citat: Matt. poslato Oktobar 31, 2021, 17:59:13 POSLE PODNE
Ne shvatam sta pokusavas da kazes... Ako imate nesto da kazete konkretno recite, ne tako...
Ljudi su ti rekli jedno 5 stvari, pri cemu su ti dali i kod i predloge i kritike.

Mogao si da napravis boju da se moze menjati, ne staticki definisano kad vec mozes.
Kreiras TD-ove a ne brises ih nikad. Dobro ajde ovo su Player TD-ovi, samp ce to za tebe uraditi, ali ovde ce raditi, a za neku drugu stvar nece.
Prikazujes TD na spawn, ali nikad ga ne hide, sto znaci da ako igrac ode u spectate ili bilo sta slicno, TD za pare ostaje iako je hood sakriven.
Koristis OnPlayerUpdate za ovo. Mnogo ljudi preuvelicava to da se ne koristi OnPlayerUpdate (nekad stvarno treba taj callback za animacije, anticheat i slicno). Ali za ovo OnPlayerUpdate je glupo i neoptimalno.
Nemas funkcije za prikazivanje i sakrivanje $$$
Mogao si da hook GivePlayerMoney da ti odmah update pare (doduse ajde nije obavezno, ako imas tajmer to jest OnPlayerUpdate u tvom slucaju sa GetPlayerMoney).

I sve su to gluposti u poredjenu sa jednom. Ti si ovo release kao include, koristio public funkcije ali ih nisi nigde hook. Sta se desi ako covek ima OnPlayerConnect u modu?

Citat: Deleted User poslato Oktobar 31, 2021, 20:18:53 POSLE PODNE
Ljudi su ti rekli jedno 5 stvari, pri cemu su ti dali i kod i predloge i kritike.

Mogao si da napravis boju da se moze menjati, ne staticki definisano kad vec mozes.
Kreiras TD-ove a ne brises ih nikad. Dobro ajde ovo su Player TD-ovi, samp ce to za tebe uraditi, ali ovde ce raditi, a za neku drugu stvar nece.
Prikazujes TD na spawn, ali nikad ga ne hide, sto znaci da ako igrac ode u spectate ili bilo sta slicno, TD za pare ostaje iako je hood sakriven.
Koristis OnPlayerUpdate za ovo. Mnogo ljudi preuvelicava to da se ne koristi OnPlayerUpdate (nekad stvarno treba taj callback za animacije, anticheat i slicno). Ali za ovo OnPlayerUpdate je glupo i neoptimalno.
Nemas funkcije za prikazivanje i sakrivanje $$$
Mogao si da hook GivePlayerMoney da ti odmah update pare (doduse ajde nije obavezno, ako imas tajmer to jest OnPlayerUpdate u tvom slucaju sa GetPlayerMoney).

I sve su to gluposti u poredjenu sa jednom. Ti si ovo release kao include, koristio public funkcije ali ih nisi nigde hook. Sta se desi ako covek ima OnPlayerConnect u modu?
Razumem, koristio sam hook ali mi se neko israo po tome tako da sam stavio public, vratio sam hook. Nisam imao bas vremena sve da uradim, uradio sam na brzinu, tek sad kad lepo gledam kod vidim da kurcu ne valja, kasnije cu ja sve to izmeniti i popraviti. Hvala ti na komentaru, samo molim tebe i sve clanove foruma da ovakve komentare saljete a ne BRE BRE BRE GLUP SI i slicno, ja i jesam ovo objavio da bi cuo tudja misljenja i predloge, ne radi prozivki.
https://discord.io/westmont
Westmont Roleplay — A continuation of the San Andreas singleplayer storymode.
SA-MP 0.3.DL gamemode with custom models.