Salut.Voi continua tutorialele lui AsuStar.In acest tutorial va voi invata cum sa inregistrati un cvar si cum sa-l folositi.Intai voi face pluginul urmand sa va explic:
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!
Explicatie:
1) In prima etapa am inclus toate librariile necesare.
2)Am inregistrat o noua variabila.
3)In public plugin_init() am inregistrat un Ham , presupun ca stiti din tutorialele anterioare.
4)Am ajuns la cvar..Functia register_cvar are 2 parametrii mai precis Numele cvar-ului pe care il inregistrezi si Valoarea cvar-ului.Cvar-ul , pentru inceput se inregistreaza prin cazul unei variabile.In cazul nostru variabila esteAMXX 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!.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!
are un singur parametru , variabila in care este inregistrat cvarul.get_pcvar_num extrage valoarea unui cvar.In cazul nostruAMXX 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!extrage valoarea cvar-ului "wg_money" , valoarea fiind "1000".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!
5)In public bonus_money(id) am setat banii jucatorului.
Cam atat pentru acest tutorial , sper ca v-a fost de ajutor.Daca am omis ceva va rog sa-mi lasati un reply.