Szerző Téma: [Pénz helyére HealthPoints]  (Megtekintve 1875 alkalommal)

Nem elérhető Lömpi

  • 1257
    • Profil megtekintése
[Pénz helyére HealthPoints]
« Dátum: 2010. Április 03. - 15:56:00 »
0 Show voters
Egyszerü kis Kód..

Lényege:
A Pénz Helyére a HP-d Írja!
Elöször is szükségünk van a SetCash Funkcióra
SetCash Beágyazása
 
stock SetCash(playerid, money)   {   ResetPlayerMoney(playerid);    GivePlayerMoney(playerid, money);   }  

 
OnPlayerUpdate
 
public OnPlayerUpdate(playerid)   
{
      new Float:xxx = GetPlayerHealth(playerid, xxx);   SetCash(playerid, floatround(xxx,floatround_round)); // javítva by krisk..
}

 
Remélem Hasznát veszed
« Utoljára szerkesztve: 2011. November 22. - 19:47:58 írta APC »

Nem elérhető Mike

  • 849
    • Profil megtekintése
[Pénz helyére HealthPoints]
« Válasz #1 Dátum: 2010. Április 03. - 16:01:12 »
0 Show voters
Ha jól emléxem ezt hiv. fórumon kérte egy gyerek de ennk ellenére hasznos kis leírás grat.:D

[Pénz helyére HealthPoints]
« Válasz #2 Dátum: 2010. Április 03. - 22:10:53 »
0 Show voters
Jó kis leírás  ;)

Nem elérhető Iceaac

  • 2187
    • Profil megtekintése
[Pénz helyére HealthPoints]
« Válasz #3 Dátum: 2010. Április 04. - 11:40:46 »
0 Show voters
SetPlayerMoney != SetCash

Nem elérhető krisk

  • 2380
    • Profil megtekintése
[Pénz helyére HealthPoints]
« Válasz #4 Dátum: 2010. Május 28. - 07:17:06 »
0 Show voters
tudja, de o lenullázza a pénzt, hogy ne adja hozzá az eredetihez :D

Nem elérhető Epsilon

  • 1854
    • Profil megtekintése
[Pénz helyére HealthPoints]
« Válasz #5 Dátum: 2010. Május 28. - 14:18:09 »
0 Show voters
Azért kerekíteni se ártana..

Nem elérhető Iceaac

  • 2187
    • Profil megtekintése
[Pénz helyére HealthPoints]
« Válasz #6 Dátum: 2010. Május 28. - 14:36:22 »
0 Show voters
Idézetet írta: krisk date=1275023826\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"1232\" data-ipsquote-contentclass=\"forums_Topic
tudja, de o lenullázza a pénzt, hogy ne adja hozzá az eredetihez :D
 
Mikor én csekkoltam még nem láttam ott SetCash-t.. Am felesleges új tömb ehhez.
 

Azért kerekíteni se ártana..
 
[/quote]
Igaz, de nem fog látszani, mert alapból is 0-k vannak ott...

Nem elérhető krisk

  • 2380
    • Profil megtekintése
[Pénz helyére HealthPoints]
« Válasz #7 Dátum: 2010. Május 28. - 16:05:01 »
0 Show voters
Idézetet írta: Epsilon date=1275049089\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"1232\" data-ipsquote-contentclass=\"forums_Topic
Azért kerekíteni se ártana..
 
Voála:
 
 new Float:xxx = GetPlayerHealth(playerid, xxx);   SetCash(playerid, floatround(xxx,floatround_round));

Nem elérhető Lömpi

  • 1257
    • Profil megtekintése
[Pénz helyére HealthPoints]
« Válasz #8 Dátum: 2010. Május 28. - 16:59:07 »
0 Show voters
Idézetet írta: krisk date=1275055501\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"1232\" data-ipsquote-contentclass=\"forums_Topic


Azért kerekíteni se ártana..
 
Voála:
 
 new Float:xxx = GetPlayerHealth(playerid, xxx);   SetCash(playerid, floatround(xxx,floatround_round));

 

[/quote]
javítva...

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal