CMD: Rank (Server: Unknown Command)
#1

This command isn't working, just says "server: unknown command" what's up

pawn Код:
CMD:rank(playerid,params[])
{
     if(GetPlayerScore(playerid) < 0)
     {
        SendClientMessage(playerid,YELLOW,"Private");
     }
     else if(GetPlayerScore(playerid) < 50)
     {
        SendClientMessage(playerid,YELLOW,"Corporal");
     }
     else if(GetPlayerScore(playerid) < 100)
     {
        SendClientMessage(playerid,YELLOW,"Lieutenant");
     }
     else if(GetPlayerScore(playerid) < 200)
     {
        SendClientMessage(playerid,YELLOW,"Captain");
     }
     else if(GetPlayerScore(playerid) < 350)
     {
        SendClientMessage(playerid,YELLOW,"Lieutenant Major");
     }
     else if(GetPlayerScore(playerid) < 500)
     {
        SendClientMessage(playerid, YELLOW,"Colonel");
     }
     else if(GetPlayerScore(playerid) < 800)
     {
        SendClientMessage(playerid, YELLOW,"General");
     }
     else if(GetPlayerScore(playerid) < 1500)
     {
        SendClientMessage(playerid, YELLOW,"Master of War");
     }
     return 1;
}
Reply
#2

All command or only this command shows the "SERVER: Unknown Command"?
Reply
#3

This is one command in my filterscript and the only one that doesn't work...here's all script

pawn Код:
#include <a_samp>
#include <zcmd>


#define GREEN 0x33AA33AA
#define WHITE 0xFFFFFFAA
#define YELLOW 0xF9FF00FF
#define RED 0xFB0000FF
#if defined FILTERSCRIPT


public OnFilterScriptInit()
{
        print("\n--------------------------------------");
        print("Rank System by Tuntun!!! ");
        print("--------------------------------------\n");
        return 1;
}

main{}

#endif


public OnPlayerSpawn(playerid)
{
    if(GetPlayerScore(playerid) > 0 && GetPlayerScore(playerid) < 10)
    {
        new Text3D:label = Create3DTextLabel("Private",WHITE, 30.0, 40.0, 50.0, 40.0, 0);
        Attach3DTextLabelToPlayer(label, playerid, 0.0, 0.0, 0.4);
    }
    else if(GetPlayerScore(playerid) > 10 && GetPlayerScore(playerid) < 100)
    {
        new Text3D:label1 = Create3DTextLabel("Corporal",WHITE, 30.0, 40.0, 50.0, 40.0, 0);
        Attach3DTextLabelToPlayer(label1, playerid, 0.0, 0.0, 0.4);
    }
    else if(GetPlayerScore(playerid) > 100 && GetPlayerScore(playerid) < 200)
    {
        new Text3D:label2 = Create3DTextLabel("Lieutenant",WHITE, 30.0, 40.0, 50.0, 40.0, 0);
        Attach3DTextLabelToPlayer(label2, playerid, 0.0, 0.0, 0.4);
    }
    else if(GetPlayerScore(playerid) > 200 && GetPlayerScore(playerid) < 350)
    {
        new Text3D:label3 = Create3DTextLabel("Captain",WHITE, 30.0, 40.0, 50.0, 40.0, 0);
        Attach3DTextLabelToPlayer(label3, playerid, 0.0, 0.0, 0.4);
    }
    else if(GetPlayerScore(playerid) > 350 && GetPlayerScore(playerid) < 500)
    {
        new Text3D:label4 = Create3DTextLabel("Lieutenant Major",WHITE, 30.0, 40.0, 50.0, 40.0, 0);
        Attach3DTextLabelToPlayer(label4, playerid, 0.0, 0.0, 0.4);
    }
    else if(GetPlayerScore(playerid) > 500 && GetPlayerScore(playerid) < 850)
    {
        new Text3D:label5 = Create3DTextLabel("Colonel",WHITE, 30.0, 40.0, 50.0, 40.0, 0);
        Attach3DTextLabelToPlayer(label5, playerid, 0.0, 0.0, 0.4);
    }
    else if(GetPlayerScore(playerid) > 850 && GetPlayerScore(playerid) < 1500)
    {
        new Text3D:label6 = Create3DTextLabel("General",WHITE, 30.0, 40.0, 50.0, 40.0, 0);
        Attach3DTextLabelToPlayer(label6, playerid, 0.0, 0.0, 0.4);
    }
    else if(GetPlayerScore(playerid) >= 1500)
    {
        new Text3D:label7 = Create3DTextLabel("Master of War",WHITE, 30.0, 40.0, 50.0, 40.0, 0);
        Attach3DTextLabelToPlayer(label7, playerid, 0.0, 0.0, 0.4);
    }
    return 1;
}



CMD:ranks(playerid,params[])
{
ShowPlayerDialog(playerid, RED, DIALOG_STYLE_MSGBOX, "{FFFF00}General Player Commands","{FFFF00}Private: 10 Score\nCorporal: 50 Score\nLieutenant: 100 Score\nCaptain: 200 Score\n Lieutenant Major: 350 Score\nColonel: 500 Score\nGeneral: 800 Score\nMaster of War: 1500 Score","Ok","");

return 1;
}

CMD:rank(playerid,params[])
{
     if(GetPlayerScore(playerid) < 0)
     {
        SendClientMessage(playerid, GREEN,"Private");
     }
     else if(GetPlayerScore(playerid) < 50)
     {
        SendClientMessage(playerid, GREEN,"Corporal");
     }
     else if(GetPlayerScore(playerid) < 100)
     {
        SendClientMessage(playerid, GREEN,"Lieutenant");
     }
     else if(GetPlayerScore(playerid) < 200)
     {
        SendClientMessage(playerid, GREEN,"Captain");
     }
     else if(GetPlayerScore(playerid) < 350)
     {
        SendClientMessage(playerid, GREEN,"Lieutenant Major");
     }
     else if(GetPlayerScore(playerid) < 500)
     {
        SendClientMessage(playerid, GREEN,"Colonel");
     }
     else if(GetPlayerScore(playerid) < 800)
     {
        SendClientMessage(playerid, GREEN,"General");
     }
     else if(GetPlayerScore(playerid) < 1500)
     {
        SendClientMessage(playerid, GREEN,"Master of War");
     }
     return 1;
}
Reply
#4

hmm dude i think u need to remove that

#if defined filterscript
and
#endif

also remove main {} cuz this is not a gamemode...

EDIT:
if u want #if defined filterscript add this on the top of ur fs

"#define Filterscript"
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)