GTA Közösség - A magyar GTA fórum

San Andreas Multiplayer (SA-MP) => SA-MP: Szerverfejlesztés => A témát indította: Lömpi - 2010. április 03. - 15:56:00

Cím: [Pénz helyére HealthPoints]
Írta: Lömpi - 2010. április 03. - 15:56:00
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
Cím: [Pénz helyére HealthPoints]
Írta: Mike - 2010. április 03. - 16:01:12
Ha jól emléxem ezt hiv. fórumon kérte egy gyerek de ennk ellenére hasznos kis leírás grat.:D
Cím: [Pénz helyére HealthPoints]
Írta: [M]D[S]Rotary - 2010. április 03. - 22:10:53
Jó kis leírás  ;)
Cím: [Pénz helyére HealthPoints]
Írta: Iceaac - 2010. április 04. - 11:40:46
SetPlayerMoney != SetCash
Cím: [Pénz helyére HealthPoints]
Írta: krisk - 2010. május 28. - 07:17:06
tudja, de o lenullázza a pénzt, hogy ne adja hozzá az eredetihez :D
Cím: [Pénz helyére HealthPoints]
Írta: Epsilon - 2010. május 28. - 14:18:09
Azért kerekíteni se ártana..
Cím: [Pénz helyére HealthPoints]
Írta: Iceaac - 2010. május 28. - 14:36:22
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...
Cím: [Pénz helyére HealthPoints]
Írta: krisk - 2010. május 28. - 16:05:01
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));
Cím: [Pénz helyére HealthPoints]
Írta: Lömpi - 2010. május 28. - 16:59:07
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...