Salutare,acesta este al 7-lea WarGods Tutorial,iar astazi vom vorbi despre conditia if,sa incepem.

-Codul nostru de astazi va fi unul simplu,si se va baza mai mult pe conditia if,deoarece doresc sa-i intelegeti rolul,avem aici un cod facut rapid:
AMXX Code:
You have to register to be able to see this link. Register HERE! If you are already a member please log in! If you still you are not able to see the link you need to activate your account or an administrator need to activate your account!


1)Prima mare a codului va este cunoscuta,dar in publicul numit cmd_bani(),
veti vedea un if,iar alaturi este o functie din biblioteca amxmodx.

2)Intrebariile vin acum,precum "Ce face aceasta functie is_user_alive(id) ?",aceasta functie verifica daca cineva este in viata,ea are un singur parametru,"Cu-i sa execute aceasta verificare"
AMXX Code:
You have to register to be able to see this link. Register HERE! If you are already a member please log in! If you still you are not able to see the link you need to activate your account or an administrator need to activate your account!
,cea de-a 2-a intrebare este "Ce face acel if ?",acest if,reprezinta o conditia,traducerea acestuia este = daca.Iar logica este in felul urmator:
AMXX Code:
You have to register to be able to see this link. Register HERE! If you are already a member please log in! If you still you are not able to see the link you need to activate your account or an administrator need to activate your account!
,este foarte simplu,precum am spus si la inceput aveti nevoie de putina logica.

3)In cazul in care vreti "si una si alta",adica daca este in viata sa-i dea un mesaj,iar daca nu,sa primeasca alt tip de mesaj,codul poate fi urmatorul:
AMXX Code:
You have to register to be able to see this link. Register HERE! If you are already a member please log in! If you still you are not able to see the link you need to activate your account or an administrator need to activate your account!


4)In codul nostru a aparut o noua conditie numita else,else = altceva,aceasta fiind traducerea mota mo,dar logica din cod,este inteleasa mult mai bine,traducerea va fi in felu urmator.
AMXX Code:
You have to register to be able to see this link. Register HERE! If you are already a member please log in! If you still you are not able to see the link you need to activate your account or an administrator need to activate your account!


Este simplu de utilizat,daca nu intelegeti va rog postati,sau daca am omis ceva.
Aceasta a fost al 7-lea WarGods Tutorial,iar pana data viitoare va urez bafta .