Jump to content

Cerere tutorial


BoBBiTa

Recommended Posts

Descriere tutorial : Salut sa-mp.ro, de fiecare data cand scriu pe server o comanda care nu exista gen  (/jump3)  imi apare : SERVER : unknown command Cum pot schimba acest text , de exemplu sa imi apara : Aceasta comanda nu exista..

Edited by Bobita

// Desenul meu animat 
// Alte episoade aici: 
https://www.youtube.com/channel/UCF2kY1CzhHI_PCyV5LprQ1w/videos

 

 

 

Link to comment
Share on other sites

Banuiesc ca folosesti strcmp, cauta la sfrsitul OnPlayerCommandText ultimul 'return 0;'.

/*Explicatie, daca pui in publicul OnPlayerCommandText return 0 va returna mesajum Server: unknow command, poti returna un mesaj la sfrsit in loc de 0 ti-am lasat exemplu mai jos*/
new szString[ 128 ];
format( szString, 128, "Comanda %s nu exista", cmdtext );
return SendClientMessage( playerid, -1, szString );

Daca folosesti zcmd foloseste OnPlayerCommandPerformed, dar doar daca este tot gm-ul zcmd.

Se foloseste asa.

public OnPlayerCommandPerformed(playerid, cmdtext[], success){
    if( !succes )// verificam daca comanda nu s-a executat.
    {
        new szString[ 128 ];
        format( szString, 128, "Comanda %s nu exista", cmdtext );
    }
    return 1;
}

I'm back bitches.

Link to comment
Share on other sites

Folosesc zcmd, prin faptul ca este mai rapid, si apropo cand pun ce ai zis tu imi da eroarea asta : error 017: undefined symbol "succes" la linia if( !succes)

EDIT : Am rezolvat la succes mai trebuia adaugat un s, : success, Puteti da T.C

Edited by Bobita

// Desenul meu animat 
// Alte episoade aici: 
https://www.youtube.com/channel/UCF2kY1CzhHI_PCyV5LprQ1w/videos

 

 

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • 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.