Page 3 of 3

Re: Ce face set_task? [Amxx]

Posted: 04 Aug 2016, 01:39
by Lux0R^
*Or!g!naL* wrote:am un meniu care contine hp si vreau ca sa poti cumapra hp odata la 10 sec, aceasta restrictie doar la casa cu hp . Cum ar trebuie sa arata linia, o pun eu in sursa
nu se poate intr-o linie... trebuie sa postezi pluginul (daca nu e lung) sau o portiune (daca e lung) si dupa te ajut eu sa intelegi..

Re: Ce face set_task? [Amxx]

Posted: 04 Aug 2016, 14:16
by LondoN eXtream
1. Creeam un nou boll.
Cod | Afiseaza codul
new bool:HP[33];
2. In handler adaugam
COD | Afiseaza codul
if(HP[id])
{ 
           client_print(id, print_chat, "[HP] Odata la 10 secunde!");
           return PLUGIN_HANDLED;
}

HP[id] = true;
set_user_health(id, get_user_health(id) + 50);
set_task(Float:Timp, "off_hp", id);
off_hp | Afiseaza codul
public off_hp(id)             HP[id] = false;

Re: Ce face set_task? [Amxx]

Posted: 11 Sep 2016, 09:03
by Fuffy
londonm folosestete get_gametime e mult mai usor.