+ Reply to Thread
Results 1 to 1 of 1
  1. [WarGods Tutorials Nr.5] Inregistrarea unei comenzi in chat

    #1
    Manager Server:
    Zombie.WarGods.ro
    lAsuStarl's Avatar
    Member since
    May 2015
    Location
    0.0.0.0
    Posts
    588
    Mentioned
    3 Post(s)
    Achievements Total Posts 2 Total Posts 1 Days Registered 3 Days Registered 2 Days Registered 1 Threads 1 Confirmed Friends 1
    Doneaza
    Sustine Comunitatea WarGods!
    Fii unul de-al nostru! Doneaza
    Doneaza in Cont Bancar
    Click aici pentru a face o Donatie

    Post [WarGods Tutorials Nr.5] Inregistrarea unei comenzi in chat

    Salutare,acesta este al 5-lea WarGods Tutorial,si astazi va voi invata/explica cum sa va inregistrati propia voastra comanda in chat,sa incepem.

    -Inregistrarea unei comenzi in chat,se va face cu ajutorul biblioteci amxmodx,deoarece aceasta biblioteca,contine functia de care avem nevoie.
    -Aceasta functie arata cam asa:
    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)Comanda pe care doriti sa o inregistrati va trebui facuta in ghilimele,altfel veti primi erori de compilare,si la fel si publicul vostru.

    2)Intrebarea voastra este "Ce este cu acel "say" in comanda?",daca bine stiti in Conter-Strike,cand doriti sa scrieti ceva apasati pe tasta y,dar in acelasi timp va aparea si acel text "say:",de acolo se trage acel "say",din comanda noastra

    3)Executarea publicului,se va face unui jucator,cu conditia sa scrie exact,comanda voastra pe care a-ti inregistrato,in caz contrar puteti sa umpleti chat-ul cu orice,dar nu va functiona.

    4)In codul care va fi mai jos,logica lui va fi urmatoarea:
    -Daca un jucator scrie comanda pe care eu,am inregistrat-o,va primi un mesaj in chat.

    Observatie !
    -Inregistrarea unei comenzi,tot timpul se va face in plugin_init().fiind publicul de baza al unui plugin,nu uitati acest lucru important.

    5)Creem un plugin nou,si vom folosi functia pe care am explicat-o mai sus,si va arata cam asa:
    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!


    6)In cazul in care doriti o comanda pe care sa o inregistrati,si sa fie utilizata doar din consola functia arata cam asa:
    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!


    7)Exact aceasi parametri sunt la amble 2 functii,doar difera modul de functionare al lor :
    Pawn 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!

    -Cam asta poate fi observatia de azi,si daca doriti sa inregistrati in consola o comanda,plugin-ul va arata cam asa:
    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!


    8)In ultima linie de cod am modificat un singur parametru,acela fiind print_chat,in print_console,deoarece daca tot am inregistrat o comanda in consola,mesajul sa fie tot acolo.

    Aceste functii,sunt foarte simple de utilizat,si de invatat,daca nu a-ti inteles ceva postati aici,sau daca am omis ceva.Acesta a fost al 5-lea WarGods Tutorial,ne vedem la urmatorul .
    Last edited by lAsuStarl; 22-10-2015 at 06:33 PM.
    Zombie Escape

    Thanks ~TraNda~, Boutique a dat Thanks acetui post
    Like ~TraNda~, Boutique a dat Like acetui post

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Partners
Humble Monthly Bundle
Voucher PC-Garage