Jump to content

[Tutorial] - Utilizarea procesorului de comenzi ZCMD + SSCANF2


InceMan

Recommended Posts

Salutare sa-mp.ro, astazi va voi arata cum sa folositi procesorul de comenzi ZCMD combinat cu sscanf2. Toata lumea stie ca acest procesor de comenzi este foarte rapid si foarte usor de folosit. Mai jos in cateva randuri va vor fi explicate toate detaliile.

 

1. Descarcam include-urile zcmd si sscanf2;

2. Copiem include-urile in pawno/include;

3. Intram in gamemode si la inceputul acestua punem:

#include <zcmd>
#include <sscanf2>

4. Acum modificam vechiul sistem de comenzi (strcmp) in noul sistem (zcmd), astfel:

In loc de:

public OnPlayerCommandText(playerid, cmdtext[])

in

public OnPlayerCommandPerformed(playerid, cmdtext[], success)

apoi adaugam aceasta pentru a face vizibile comenzile inexistente in gamemode:

if(!success) return SendClientMessage(playerid, -1, "SERVER: Unknwon command.");

Cam asta a fost tot. Sper ca va fost de folos celor ce n-au aflat inca de acest procesor de comenzi.

FiveGame  Lands

Pawno Developer, Mapping , Scripter

Since 2016

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.