Jump to content

[3]Cum sa faci o comanda ZCMD


Gireada

Recommended Posts

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 Solidfiles sau PasteBin

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);
}

Comanda tutorial2 va executa ce executa si comanda tutorial.

Daca nu ati inteles va rog sa lasati replay cu ce anume.

 

1859311972_BANNER-GIREADAcopy-min.thumb.png.48e5e420ae2185dce5b244965a1d2601.png

 

Link to comment
Share on other sites

  • 2 months later...
  • 2 weeks later...
  • 4 months later...
  • 3 weeks later...
  • 3 weeks later...

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.