#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(playerid, cmdtext[])
{
if(!strcmp(cmdtext,"/fly",true))
{
StartFly(playerid);
return 1;
}
if(!strcmp(cmdtext,"/stopfly",true))
{
StopFly(playerid);
return 1;
}
return 0;
}
CMD:fly(playerid, params[])
{
StartFly(playerid);
return 1;
}
CMD:stopfly(playerid, params[])
{
StopFly(playerid);
return 1;
}
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 код:
|
#include <zcmd>