all commands in one FS returning ERROR:Unknown Command
#1

well as the title says i have a FS but all of its commands are returning Error: Unknown Command i dont know why it dont have any errors here is the code

pawn Код:
#define FILTERSCRIPT

#include <a_samp>
#include <YSI\y_ini>
#include <sscanf2>
#include <dudb>
#include <zcmd>
#include <a_zones>

#define PATH "/Admin System/Users/%s.ini"

#define PLAYER_MUST_REGISTER
#define REGISTERED_MONEY 5000
#define AUTOLOGIN

#define white 0xFFFFFFA
#define RED          0xE60000AA
#define ABLUE        0x2641FEAA
#define red 0xFF0000AA
#define lime 0x00FF00FF
#define yellow 0xFFFF00FF

#define DIALOG_REGISTER 999
#define DIALOG_LOGIN 998

#define FormatMSG(%0,%1,%2,%3)\
        do{\
            format( _S_T_R_, sizeof ( _S_T_R_ ), ( %2 ), %3);\
            SendClientMessage( ( %0 ),( %1 ), _S_T_R_);\
        }\
        while ( False )


#pragma unused ret_memcpy

enum iDetails {
    Pass,
    Cash,
    Score,
    AdminLevel,
    VIPLevel,
    Registered,
    Banned
};
new pInfo[MAX_PLAYERS][iDetails];

new _S_T_R_[ 1000 ];
new False=false;

#if defined AUTOLOGIN
    new pIP[MAX_PLAYERS][16];
#endif

new pLogged[MAX_PLAYERS];
new pBanned[MAX_PLAYERS];
new pAFK[MAX_PLAYER_NAME];

stock PlayerPath(playerid) {
    new iStr[256],name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,name,sizeof(name));
    format(iStr,sizeof(iStr),PATH,name);
    return iStr;
}
public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print("Login & Register & Admin System by Bella");
    print("--------------------------------------\n");
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}

public OnGameModeExit()
{
    return 1;
}

forward UserDataLoad_data(playerid,name[],value[]);

public UserDataLoad_data(playerid,name[],value[]) {
    INI_Int("Pass",pInfo[playerid][Pass]);
    #if defined AUTOLOGIN
        INI_String("IP",pIP[playerid],16);
    #endif
    INI_Int("Cash",pInfo[playerid][Cash]);
    INI_Int("Score",pInfo[playerid][Score]);
    INI_Int("AdminLevel", pInfo[playerid][AdminLevel]);
    INI_Int("VIPLevel", pInfo[playerid][VIPLevel]);
    INI_Int("Registered", pInfo[playerid][Registered]);
    INI_Int("Banned", pInfo[playerid][Banned]);
    return 1;
}

public OnPlayerConnect(playerid)
{
    pLogged[playerid] = 0;
    pAFK[playerid] = 0;
    #if defined AUTOLOGIN
        new tmpIP[16];
        GetPlayerIp(playerid,tmpIP,sizeof(tmpIP));
    #endif
    if(fexist(PlayerPath(playerid))) {
        INI_ParseFile(PlayerPath(playerid), "UserDataLoad_%s", .bExtra = true, .extra = playerid);
        #if defined AUTOLOGIN
            if(strcmp(tmpIP,pIP[playerid],true) == 0) {
                pLogged[playerid] = 1;
                SetPlayerScore(playerid,pInfo[playerid][Score]);
                GivePlayerMoney(playerid,pInfo[playerid][Cash]);
                SendClientMessage(playerid,lime,"You've been auto-logged in. [IP match]");
                return 1;
            }
        #endif
        ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_INPUT,"Login","Please enter your password below.","Login","Leave");
    } else {
        ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_INPUT,"Register","Please register by entering a password below.","Register","Leave");
    }
    if(pBanned[playerid] == 1)
    {
        SendClientMessage(playerid, RED, "You Are Currently Banned from PH Bye Bye");
        Kick(playerid);
    }
    return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
    if(pLogged[playerid] == 1) {
        new INI:iFile = INI_Open(PlayerPath(playerid));
        INI_SetTag(iFile,"data");
        INI_WriteInt(iFile,"Cash",GetPlayerMoney(playerid));
        INI_WriteInt(iFile,"Score",GetPlayerScore(playerid));
        INI_Close(iFile);
    }
    pLogged[playerid] = 0;
    pAFK[playerid] = 0;
    return 1;
}

public OnPlayerRequestSpawn(playerid)
{
    if(pLogged[playerid] == 0) return SendClientMessage(playerid,yellow,"You must register or login before spawning!");
    return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == DIALOG_REGISTER) {
        GetPlayerIp(playerid,pIP[playerid],16);
        if(!response) Kick(playerid);
        if(!strlen(inputtext)) return ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_INPUT,"Register","Please enter a password.","Register","Leave");
        new INI:iFile = INI_Open(PlayerPath(playerid));
        INI_SetTag(iFile,"data");
        INI_WriteInt(iFile,"Pass",udb_hash(inputtext));
        #if defined AUTOLOGIN
            INI_WriteString(iFile,"IP",pIP[playerid]);
        #endif
        INI_WriteInt(iFile,"Cash",REGISTERED_MONEY);
        INI_WriteInt(iFile,"Score",0);
        INI_WriteInt(iFile,"AdminLevel",0);
        INI_WriteInt(iFile,"VIPLevel",0);
        INI_WriteInt(iFile,"Registered",1);
        INI_WriteInt(iFile,"Banned",0);
        INI_Close(iFile);
        pLogged[playerid] = 1;
        new iStr[128];
        format(iStr,sizeof(iStr),"You've successfully registered with the password \"%s\".",inputtext);
        SendClientMessage(playerid,yellow,iStr);
        return 1;
    }
    if(dialogid == DIALOG_LOGIN) {
        if(!response) Kick(playerid);
        new iStr[128],gTries;
        if(gTries == 0) gTries = 1;
        if(gTries == 3) {
            new pName[30];
            GetPlayerName(playerid,pName,sizeof(pName));
            format(iStr,sizeof(iStr),"%s has been kicked for exceeding login tries.",pName);
            SendClientMessageToAll(red,iStr);
            return Kick(playerid);
        }
        if(!strlen(inputtext)) {
            format(iStr,sizeof(iStr),"Please enter your password. Tries: %i/3",gTries);
            return ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_INPUT,"Login",iStr,"Login","Leave");
        }
        if(udb_hash(inputtext) == pInfo[playerid][Pass]) {
            pLogged[playerid] = 1;
            SendClientMessage(playerid,lime,"You've successfully logged in.");
            SetPlayerScore(playerid,pInfo[playerid][Score]);
            GivePlayerMoney(playerid,pInfo[playerid][Cash]);
        } else {
            format(iStr,sizeof(iStr),"Incorrect password. Tries: %i/3",gTries);
            ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_INPUT,"Register",iStr,"Login","Leave");
            gTries++;
            return 1;
        }
        return 1;
    }
    return 1;
}
//================================================================== [StandardCMDS] ==========================================================//
CMD:PM(playerid, params[])
{
    new id, message, pmstring1[128], pmstring2[128];
    if(sscanf(params, "ui", id, message)) return SendClientMessage(playerid, RED,"USAGE:{FFFF00}/PM [playerid] [Message]");
    if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, RED,"ERROR Player Specified is Offline");
    if(id == playerid) return SendClientMessage(playerid, RED,"You can't PM yourself"); // Optional
    {
        format(pmstring1, sizeof(pmstring1),"[PM Message Recived From %s] %s", PlayerName2(playerid), message);
        SendClientMessage(id, RED, pmstring1);
        format(pmstring2, sizeof(pmstring2),"[PM Message Sent To %s] %s", PlayerName2(id), message);
        SendClientMessage(playerid, RED, pmstring2);
    }
    return 1;
}
CMD:Loc(playerid, params[])
{
    new id;
    if(sscanf(params, "u", id)) return SendClientMessage(playerid, RED, "USAGE:{FFFF00}/loc [id]");
    if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, RED,"ERROR Player Specified is Offline");
    if(id == playerid) return SendClientMessage(playerid, RED,"You can't Loc Yourself");
    {
        new r[64], zone[128];
        GetPlayer2DZone(id, zone, sizeof(zone));
        format(r, sizeof(r),"Player %s Is in %s", PlayerName2(id), zone);
        SendClientMessage(playerid, RED, r);
    }
    return 1;
}
CMD:AFK(playerid, params[])
{
    new string[128], afkreason[50];
    if(sscanf(params, "s[128]", afkreason)) return SendClientMessage(playerid, RED,"USAGE:{FFFF00}/afk [Reason]");
    if(strlen(afkreason))
    {
        format(string, sizeof(string),"%s is not AFK [No Reason Given]", PlayerName2(playerid));
        SendClientMessageToAll(RED, string);
        pAFK[playerid] = 1;
    }
    else
    {
        format(string, sizeof(string),"%s is not AFK [Reason: %s]", PlayerName2(playerid), afkreason);
        SendClientMessageToAll(RED, string);
        pAFK[playerid] = 1;
    }
    return 1;
}
CMD:Back(playerid, params[])
{
    new string[128];
    format(string, sizeof(string),"%s Is Now Back from being AFK, Welcome Back", PlayerName2(playerid));
    SendClientMessageToAll(RED, string);
    return 1;
}
CMD:AFKList(playerid, params[])
{
    new count = 0;
    new string[128];
   
    SendClientMessage(playerid, RED, " ");
    SendClientMessage(playerid, RED, "___________ |- Current AFK Players -| ___________");
   
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            if(pAFK[i] == 1)
            {
                count++;
                GetPlayerName(i, pAFK, sizeof(pAFK));
                format(string, sizeof(string), "Current AFK Players: %s", pAFK);
                SendClientMessage(playerid, RED, string);
            }
        }
    }
    if(count == 0)
    {
        SendClientMessage(playerid, RED,"No one is AFK here buddy.");
        SendClientMessage(playerid, RED, " _______________________________________");
    }
    return 1;
}
//================================================================== [AdminCMDS] ===========================================================//
CMD:SetLevel(playerid, params[])
{
    if(pInfo[playerid][AdminLevel] >= 10 || !IsPlayerAdmin(playerid)) return SendClientMessage( playerid, RED, "ERROR: You need to be administrator to use this command!" );
    new Player, aLevel;
    if(sscanf(params, "ui", Player, aLevel)) return SendClientMessage(playerid, RED,"USAGE: {FFFF00}/SetLevel [PlayerID] [Admin Level]");
    if(aLevel > 10 ) return SendClientMessage(playerid, RED, "ERROR: Invalid level! Max admin level you can set is 5!");

    if(IsPlayerConnected(Player))
    {
        new INI:iFile = INI_Open(PlayerPath(playerid));
        FormatMSG(Player, ABLUE, "Welcome To The Pilots Heaven Team %s has set your Level to %d", PlayerName2(playerid), aLevel);
        FormatMSG(playerid, ABLUE, "You Have Set %s's Admin Level to %d", PlayerName2(Player), aLevel);
        INI_SetTag(iFile,"data");
        INI_WriteInt(iFile,"AdminLevel",strval(params));
        INI_Close(iFile);
    }
    else return SendClientMessage(playerid, RED,"ERROR Player Specified Not Online!");
    return 1;
}
CMD:SetVIPLevel(playerid, params[])
{
    if(pInfo[playerid][AdminLevel] >= 10 || !IsPlayerAdmin(playerid)) return SendClientMessage( playerid, RED, "ERROR: You need to be administrator to use this command!" );
    new Player, vLevel;
    if(sscanf(params, "ui", Player, vLevel)) return SendClientMessage(playerid, RED,"USAGE: {FFFF00}/SetVIPLevel [PlayerID] [VIP Level]");
    if(vLevel > 10 ) return SendClientMessage(playerid, RED, "ERROR: Invalid level! Max VIP level you can set is 10!");
       
    if(IsPlayerConnected(Player))
    {
        new INI:iFile = INI_Open(PlayerPath(playerid));
        FormatMSG(Player, ABLUE, "Welcome to Pilots Heaven's Elite Band of players also known as VIPS (still in construction so no cmds right now) %s has set you VIP Level to %d", PlayerName2(playerid), vLevel);
        FormatMSG(playerid, ABLUE, "You have set %s's level to %s", PlayerName2(Player), vLevel);
        INI_SetTag(iFile,"data");
        INI_WriteInt(iFile,"VIPLevel",strval(params));
        INI_Close(iFile);
    }
    else return SendClientMessage(playerid, RED,"ERROR Player Specified Not Online!");
    return 1;
}
CMD:Crash(playerid, params[])
{
    new string[128], id, reason[50];
    if(pInfo[playerid][AdminLevel] >= 4 || !IsPlayerAdmin(playerid)) return SendClientMessage( playerid, RED, "ERROR: You need to be administrator to use this command!" );
    if(sscanf(params, "us[128]", id, reason)) return SendClientMessage(playerid, RED,"USAGE: {FFFF00}/Crash [playerid] [reason]");
    if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, RED,"ERROR Player Specified is Offline");
    if(id == playerid) return SendClientMessage(playerid, RED,"You can't crash yourself"); // Optional
    if(!strlen(reason))
    {
        format(string, sizeof(string),"%s Has been crashed by Admin %s [no reason given]",PlayerName2(id),PlayerName2(playerid));
        SendClientMessageToAll(ABLUE, string);
        GameTextForPlayer(id, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 1000, 0);
        GameTextForPlayer(id, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 2000, 1);
        GameTextForPlayer(id, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 3000, 2);
        GameTextForPlayer(id, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 4000, 3);
        GameTextForPlayer(id, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 5000, 4);
        GameTextForPlayer(id, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 6000, 5);
        GameTextForPlayer(id, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 7000, 6);
    }
    else
    {
        format(string, sizeof(string),"%s has been crashed by Admin %s [Reason: %s]",PlayerName2(id), PlayerName2(playerid), reason);
        SendClientMessageToAll(ABLUE, string);
        GameTextForPlayer(id, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 1000, 0);
        GameTextForPlayer(id, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 2000, 1);
        GameTextForPlayer(id, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 3000, 2);
        GameTextForPlayer(id, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 4000, 3);
        GameTextForPlayer(id, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 5000, 4);
        GameTextForPlayer(id, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 6000, 5);
        GameTextForPlayer(id, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 7000, 6);
    }
    return 1;
}
CMD:Ban(playerid, params[])
{
    new string[128], id, reason[50];
    if(pInfo[playerid][AdminLevel] >= 4 || !IsPlayerAdmin(playerid)) return SendClientMessage( playerid, RED, "ERROR: You need to be administrator to use this command!" );
    if(sscanf(params, "us[128]", id, reason)) return SendClientMessage(playerid, RED,"USAGE: {FFFF00}/ban [playerid] [reason]");
    if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, RED,"ERROR Player Specified is Offline");
    if(id == playerid) return SendClientMessage(playerid, RED,"You can't ban yourself"); // Optional
    if(!strlen(reason))
    {
        new INI:iFile = INI_Open(PlayerPath(playerid));
        format(string, sizeof(string),"%s Has been Banned by Admin %s [no reason given]",PlayerName2(id),PlayerName2(playerid));
        SendClientMessageToAll(ABLUE, string);
        INI_SetTag(iFile,"data");
        INI_WriteInt(iFile,"Banned", 1);
        INI_Close(iFile);
        pBanned[id] = 1;
        Kick(id);
    }
    else
    {
        new INI:iFile = INI_Open(PlayerPath(playerid));
        format(string, sizeof(string),"%s has been Banned by Admin %s [Reason: %s]",PlayerName2(id), PlayerName2(playerid), reason);
        SendClientMessageToAll(ABLUE, string);
        INI_SetTag(iFile,"data");
        INI_WriteInt(iFile,"Banned", 1);
        INI_Close(iFile);
        pBanned[id] = 1;
        Kick(id);
    }
    return 1;
}
CMD:Announce(playerid, params[])
{
    new Message[128];
    if(pInfo[playerid][AdminLevel] >= 1 || !IsPlayerAdmin(playerid)) return SendClientMessage( playerid, RED, "ERROR: You need to be administrator to use this command!" );
    if(sscanf(params, "s[128]", Message)) return SendClientMessage( playerid, RED, "USAGE: {FFFF00}/announce [Message]" );
    {
        GameTextForAll(Message, 6000, 4);
    }
    return 1;
}
CMD:Kick(playerid, params[])
{
    new string[128], id, reason[50];
    if(pInfo[playerid][AdminLevel] >= 4 || !IsPlayerAdmin(playerid)) return SendClientMessage( playerid, RED, "ERROR: You need to be administrator to use this command!" );
    if(sscanf(params, "us[128]", id, reason)) return SendClientMessage(playerid, RED,"USAGE: {FFFF00}/ban [playerid] [reason]");
    if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, RED,"ERROR Player Specified is Offline");
    if(id == playerid) return SendClientMessage(playerid, RED,"You can't ban yourself"); // Optional
    if(!strlen(reason))
    {
        format(string, sizeof(string),"%s Has been kicked by Admin %s [no reason given]",PlayerName2(id),PlayerName2(playerid));
        SendClientMessageToAll(ABLUE, string);
        Kick(id);
    }
    else
    {
        format(string, sizeof(string),"%s Has been kicked by Admin %s [Reason: %s]",PlayerName2(id),PlayerName2(playerid), reason);
        SendClientMessageToAll(ABLUE, string);
        Kick(id);
    }
    return 1;
}
//================================================================== [ STOCKS ] ===========================================================//
stock PlayerName2( i )
{
    new n[ 24 ];
    GetPlayerName( i, n, 24 );
    return n;
}

forward GetPlayerAVSAdmin(playerid);
public GetPlayerAVSAdmin(playerid)
{
    return pInfo[playerid][AdminLevel];
}
here is all the cmds that are returning Unknown cmd
pawn Код:
CMD:PM(playerid, params[])
{
    new id, message, pmstring1[128], pmstring2[128];
    if(sscanf(params, "ui", id, message)) return SendClientMessage(playerid, RED,"USAGE:{FFFF00}/PM [playerid] [Message]");
    if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, RED,"ERROR Player Specified is Offline");
    if(id == playerid) return SendClientMessage(playerid, RED,"You can't PM yourself"); // Optional
    {
        format(pmstring1, sizeof(pmstring1),"[PM Message Recived From %s] %s", PlayerName2(playerid), message);
        SendClientMessage(id, RED, pmstring1);
        format(pmstring2, sizeof(pmstring2),"[PM Message Sent To %s] %s", PlayerName2(id), message);
        SendClientMessage(playerid, RED, pmstring2);
    }
    return 1;
}
CMD:Loc(playerid, params[])
{
    new id;
    if(sscanf(params, "u", id)) return SendClientMessage(playerid, RED, "USAGE:{FFFF00}/loc [id]");
    if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, RED,"ERROR Player Specified is Offline");
    if(id == playerid) return SendClientMessage(playerid, RED,"You can't Loc Yourself");
    {
        new r[64], zone[128];
        GetPlayer2DZone(id, zone, sizeof(zone));
        format(r, sizeof(r),"Player %s Is in %s", PlayerName2(id), zone);
        SendClientMessage(playerid, RED, r);
    }
    return 1;
}
CMD:AFK(playerid, params[])
{
    new string[128], afkreason[50];
    if(sscanf(params, "s[128]", afkreason)) return SendClientMessage(playerid, RED,"USAGE:{FFFF00}/afk [Reason]");
    if(strlen(afkreason))
    {
        format(string, sizeof(string),"%s is not AFK [No Reason Given]", PlayerName2(playerid));
        SendClientMessageToAll(RED, string);
        pAFK[playerid] = 1;
    }
    else
    {
        format(string, sizeof(string),"%s is not AFK [Reason: %s]", PlayerName2(playerid), afkreason);
        SendClientMessageToAll(RED, string);
        pAFK[playerid] = 1;
    }
    return 1;
}
CMD:Back(playerid, params[])
{
    new string[128];
    format(string, sizeof(string),"%s Is Now Back from being AFK, Welcome Back", PlayerName2(playerid));
    SendClientMessageToAll(RED, string);
    return 1;
}
CMD:AFKList(playerid, params[])
{
    new count = 0;
    new string[128];
   
    SendClientMessage(playerid, RED, " ");
    SendClientMessage(playerid, RED, "___________ |- Current AFK Players -| ___________");
   
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            if(pAFK[i] == 1)
            {
                count++;
                GetPlayerName(i, pAFK, sizeof(pAFK));
                format(string, sizeof(string), "Current AFK Players: %s", pAFK);
                SendClientMessage(playerid, RED, string);
            }
        }
    }
    if(count == 0)
    {
        SendClientMessage(playerid, RED,"No one is AFK here buddy.");
        SendClientMessage(playerid, RED, " _______________________________________");
    }
    return 1;
}
//================================================================== [AdminCMDS] ===========================================================//
CMD:SetLevel(playerid, params[])
{
    if(pInfo[playerid][AdminLevel] >= 10 || !IsPlayerAdmin(playerid)) return SendClientMessage( playerid, RED, "ERROR: You need to be administrator to use this command!" );
    new Player, aLevel;
    if(sscanf(params, "ui", Player, aLevel)) return SendClientMessage(playerid, RED,"USAGE: {FFFF00}/SetLevel [PlayerID] [Admin Level]");
    if(aLevel > 10 ) return SendClientMessage(playerid, RED, "ERROR: Invalid level! Max admin level you can set is 5!");

    if(IsPlayerConnected(Player))
    {
        new INI:iFile = INI_Open(PlayerPath(playerid));
        FormatMSG(Player, ABLUE, "Welcome To The Pilots Heaven Team %s has set your Level to %d", PlayerName2(playerid), aLevel);
        FormatMSG(playerid, ABLUE, "You Have Set %s's Admin Level to %d", PlayerName2(Player), aLevel);
        INI_SetTag(iFile,"data");
        INI_WriteInt(iFile,"AdminLevel",strval(params));
        INI_Close(iFile);
    }
    else return SendClientMessage(playerid, RED,"ERROR Player Specified Not Online!");
    return 1;
}
CMD:SetVIPLevel(playerid, params[])
{
    if(pInfo[playerid][AdminLevel] >= 10 || !IsPlayerAdmin(playerid)) return SendClientMessage( playerid, RED, "ERROR: You need to be administrator to use this command!" );
    new Player, vLevel;
    if(sscanf(params, "ui", Player, vLevel)) return SendClientMessage(playerid, RED,"USAGE: {FFFF00}/SetVIPLevel [PlayerID] [VIP Level]");
    if(vLevel > 10 ) return SendClientMessage(playerid, RED, "ERROR: Invalid level! Max VIP level you can set is 10!");
       
    if(IsPlayerConnected(Player))
    {
        new INI:iFile = INI_Open(PlayerPath(playerid));
        FormatMSG(Player, ABLUE, "Welcome to Pilots Heaven's Elite Band of players also known as VIPS (still in construction so no cmds right now) %s has set you VIP Level to %d", PlayerName2(playerid), vLevel);
        FormatMSG(playerid, ABLUE, "You have set %s's level to %s", PlayerName2(Player), vLevel);
        INI_SetTag(iFile,"data");
        INI_WriteInt(iFile,"VIPLevel",strval(params));
        INI_Close(iFile);
    }
    else return SendClientMessage(playerid, RED,"ERROR Player Specified Not Online!");
    return 1;
}
CMD:Crash(playerid, params[])
{
    new string[128], id, reason[50];
    if(pInfo[playerid][AdminLevel] >= 4 || !IsPlayerAdmin(playerid)) return SendClientMessage( playerid, RED, "ERROR: You need to be administrator to use this command!" );
    if(sscanf(params, "us[128]", id, reason)) return SendClientMessage(playerid, RED,"USAGE: {FFFF00}/Crash [playerid] [reason]");
    if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, RED,"ERROR Player Specified is Offline");
    if(id == playerid) return SendClientMessage(playerid, RED,"You can't crash yourself"); // Optional
    if(!strlen(reason))
    {
        format(string, sizeof(string),"%s Has been crashed by Admin %s [no reason given]",PlayerName2(id),PlayerName2(playerid));
        SendClientMessageToAll(ABLUE, string);
        GameTextForPlayer(id, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 1000, 0);
        GameTextForPlayer(id, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 2000, 1);
        GameTextForPlayer(id, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 3000, 2);
        GameTextForPlayer(id, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 4000, 3);
        GameTextForPlayer(id, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 5000, 4);
        GameTextForPlayer(id, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 6000, 5);
        GameTextForPlayer(id, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 7000, 6);
    }
    else
    {
        format(string, sizeof(string),"%s has been crashed by Admin %s [Reason: %s]",PlayerName2(id), PlayerName2(playerid), reason);
        SendClientMessageToAll(ABLUE, string);
        GameTextForPlayer(id, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 1000, 0);
        GameTextForPlayer(id, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 2000, 1);
        GameTextForPlayer(id, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 3000, 2);
        GameTextForPlayer(id, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 4000, 3);
        GameTextForPlayer(id, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 5000, 4);
        GameTextForPlayer(id, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 6000, 5);
        GameTextForPlayer(id, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 7000, 6);
    }
    return 1;
}
CMD:Ban(playerid, params[])
{
    new string[128], id, reason[50];
    if(pInfo[playerid][AdminLevel] >= 4 || !IsPlayerAdmin(playerid)) return SendClientMessage( playerid, RED, "ERROR: You need to be administrator to use this command!" );
    if(sscanf(params, "us[128]", id, reason)) return SendClientMessage(playerid, RED,"USAGE: {FFFF00}/ban [playerid] [reason]");
    if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, RED,"ERROR Player Specified is Offline");
    if(id == playerid) return SendClientMessage(playerid, RED,"You can't ban yourself"); // Optional
    if(!strlen(reason))
    {
        new INI:iFile = INI_Open(PlayerPath(playerid));
        format(string, sizeof(string),"%s Has been Banned by Admin %s [no reason given]",PlayerName2(id),PlayerName2(playerid));
        SendClientMessageToAll(ABLUE, string);
        INI_SetTag(iFile,"data");
        INI_WriteInt(iFile,"Banned", 1);
        INI_Close(iFile);
        pBanned[id] = 1;
        Kick(id);
    }
    else
    {
        new INI:iFile = INI_Open(PlayerPath(playerid));
        format(string, sizeof(string),"%s has been Banned by Admin %s [Reason: %s]",PlayerName2(id), PlayerName2(playerid), reason);
        SendClientMessageToAll(ABLUE, string);
        INI_SetTag(iFile,"data");
        INI_WriteInt(iFile,"Banned", 1);
        INI_Close(iFile);
        pBanned[id] = 1;
        Kick(id);
    }
    return 1;
}
CMD:Announce(playerid, params[])
{
    new Message[128];
    if(pInfo[playerid][AdminLevel] >= 1 || !IsPlayerAdmin(playerid)) return SendClientMessage( playerid, RED, "ERROR: You need to be administrator to use this command!" );
    if(sscanf(params, "s[128]", Message)) return SendClientMessage( playerid, RED, "USAGE: {FFFF00}/announce [Message]" );
    {
        GameTextForAll(Message, 6000, 4);
    }
    return 1;
}
CMD:Kick(playerid, params[])
{
    new string[128], id, reason[50];
    if(pInfo[playerid][AdminLevel] >= 4 || !IsPlayerAdmin(playerid)) return SendClientMessage( playerid, RED, "ERROR: You need to be administrator to use this command!" );
    if(sscanf(params, "us[128]", id, reason)) return SendClientMessage(playerid, RED,"USAGE: {FFFF00}/ban [playerid] [reason]");
    if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, RED,"ERROR Player Specified is Offline");
    if(id == playerid) return SendClientMessage(playerid, RED,"You can't ban yourself"); // Optional
    if(!strlen(reason))
    {
        format(string, sizeof(string),"%s Has been kicked by Admin %s [no reason given]",PlayerName2(id),PlayerName2(playerid));
        SendClientMessageToAll(ABLUE, string);
        Kick(id);
    }
    else
    {
        format(string, sizeof(string),"%s Has been kicked by Admin %s [Reason: %s]",PlayerName2(id),PlayerName2(playerid), reason);
        SendClientMessageToAll(ABLUE, string);
        Kick(id);
    }
    return 1;
}
EDIT all cmds are not working in this FS

can someone please find a fix for this?
Reply
#2

Return 0 at the end of:

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/something", cmdtext, true, 10) == 0)
    {
        // Blah blah
        return 1;
    }
    return 0;//here
}
In all your scripts.
Reply
#3

I'm 100 % sure it the filterscript is interfering with your gamemode script.
Reply
#4

but its just this FS the rest is working fine
Reply
#5

Quote:
Originally Posted by Zonoya
Посмотреть сообщение
but its just this FS the rest is working fine
Have you tried my post ?

Try it in your fs.
Reply
#6

i use ZCMD tho
Reply
#7

You know each first letter is a capital? That means you have to use the command like this: /Kick, and not like /kick
Reply
#8

ive tried that also which also returns ERROR Unknown Command
Reply
#9

Quote:
Originally Posted by Wesley221
Посмотреть сообщение
You know each first letter is a capital? That means you have to use the command like this: /Kick, and not like /kick
Commands are not case sensitive!
This is not the problem; try doing what Stigg said!
Reply
#10

u saying i should convert it to strcmp?
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)