Jump to content

Cum sa faci o comanda pe ZCMD!


hOpa # Hcs

Recommended Posts

Descriere:
 In acest tutorial va voi prezentat cum sa faceti o comanda simpla pe ZCMD
In primul rand avem nevoie de includer, il descarcam de pe http://www.solidfiles.com/d/879d1213462f...4e90c8cf9/.
Dupa ce l-am descarcat il adaugam in script #include <zcmd> . ZCMD este cel mai rapid procesor de comenzi si cel mai usor de folosit.
Sa zicem ca vreti sa va afisati un mesaj, il folosim asa:

CMD:tutorial(playerid, params[])
{
    SendClientMessage(playerid, -1, "Tutorial");
    return 1;
}

ZCMD-ul incepe cu prefixul CMD: urmat de numele comenzii tutorial si de parametrii procesorului (playerid, params[]) . playerid venind de la id-ul jucatorului care o foloseste iar params de la parametrii, pentru a il folosi cu SSCANF, ori cu strtok. Daca vrem sa facem doua comenzi identice si sa nu consumam mult spatiu il folosim cu un return mai special:

COMMAND:tutorial2(playerid, params[])
{
    return cmd_tutorial(playerid, params);
}


Daca nu ati inteles va rog sa lasati replay cu ce anume.
IMAGINI: Nu am imagini, ete doar un exemplu nu ceva complex. O sa revin si cu altceva.
APROPO IMI PUTETI PROPUNE DACA VRETI CEVA ANUME.

OFER SERVICI SCRIPTING!!! (NU IMI FAC RECLAMA)

RPG.ONEGAME.RO # SERVER ONLINE

Forum: www.OneGame.Ro

Contact: xdarkblueex [Skype]

Domenii Free: Click Aici

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.