YCMD to ZCMD
#1

Hy, how to move this command from YCMD to ZCMD ?
PHP код:
#include <a_samp>
#include <fly>
public OnFilterScriptInit()
{
    print(
"=========================================\n");
    print(
"Fly include demo FS by Norck");
    print(
" ");
    print(
"=========================================\n");
    return 
1;
}
public 
OnPlayerConnect(playerid)
{
    
InitFly(playerid);
    return 
1;
}
public 
OnPlayerCommandText(playeridcmdtext[])
{
    if(!
strcmp(cmdtext,"/fly",true))
    {
        
StartFly(playerid);
        return 
1;
    }
    if(!
strcmp(cmdtext,"/stopfly",true))
    {
        
StopFly(playerid);
        return 
1;
    }
    return 
0;

Reply
#2

That strcmp and not YCMD. Also there are so many tutorials about how to write a command in ZCMD, you should search next time.

PHP код:
CMD:fly(playeridparams[])
{
    
StartFly(playerid);
    return 
1;
}

CMD:stopfly(playeridparams[])
{
    
StopFly(playerid);
    return 
1;

Reply
#3

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
That strcmp and not YCMD. Also there are so many tutorials about how to write a command in ZCMD, you should search next time.

PHP код:
CMD:fly(playeridparams[])
{
    
StartFly(playerid);
    return 
1;
}
CMD:stopfly(playeridparams[])
{
    
StopFly(playerid);
    return 
1;

Do what Konstantinos said and be sure you include it at the top of the script:

PHP код:
#include <zcmd> 
Reply
#4

ok, Thank you :*
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)