SA-MP Forums Archive
help big problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: help big problem (/showthread.php?tid=285246)



help big problem - [MKD]Max - 23.09.2011

i got my own server is was work nice and correct i have putted script with

zcmd include

when i use

#include <zcmd>


every thing get

Unknown Command


iand i add this

Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
    return 1;
}
nothing work too!


Re: help big problem - Max_Coldheart - 23.09.2011

So in plain English, you added this to the script, and now every command is returning "Unknown Command"?


Re: help big problem - IstuntmanI - 23.09.2011

How to install ZCMD:

1. Add #include <zcmd>
2. Change
Код:
public OnPlayerCommandText( playerid, cmdtext[ ] )
{
    // Things
    return 0;
}
to
Код:
public OnPlayerCommandPerformed( playerid, cmdtext[ ], success )
{
    // Things

    if( success == 0 ) return SendClientMessage( playerid, -1, "SERVER: Unknown command !" );

    return 1;
}
3. Add before OnPlayerCommandPerformed that:
Код:
public OnPlayerCommandReceived( playerid, cmdtext[ ] )
    return 1;