ZCMD GF
#1

Hi all , i started to edit GodFather and put all cmd's in ZCMD
And now i got problem.
When i write command that i put in ZCMD
Server write: Server; Unkown Command , but command work.. :S

Pls help


Here is command:

pawn Код:
CMD:cc(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 1)
    {
        new cMsg[128], pName[MAX_PLAYER_NAME];
        for(new c; c < 25; c++)
        {
            SendClientMessage(playerid, COLOR_RED, "    ");
        }
        format(cMsg, sizeof(cMsg), "[Chat]: Admin %s je ocistio chat.", pName);
        SendClientMessage(playerid, COLOR_LIGHTBLUE, cMsg);
        SendClientMessage(playerid, COLOR_LIGHTBLUE, "www.sx-rp.info");
    }
    else SendClientMessage(playerid, COLOR_RED, "[ERROR]: Nisi Admin!");
    return 1;
}
Reply
#2

*******BUMP********
Reply
#3

pawn Код:
CMD:cc(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 1)
    {
        new cMsg[128], pName[MAX_PLAYER_NAME];
        for(new c; c < 25; c++)
        {
            SendClientMessage(playerid, COLOR_RED, "    ");
        }
        format(cMsg, sizeof(cMsg), "[Chat]: Admin %s je ocistio chat.", pName);
        SendClientMessage(playerid, COLOR_LIGHTBLUE, cMsg);
        SendClientMessage(playerid, COLOR_LIGHTBLUE, "www.sx-rp.info"); return 1;
    }
    else SendClientMessage(playerid, COLOR_RED, "[ERROR]: Nisi Admin!");
    return 1;
}
Always return 1 when your command ends!
Reply
#4

Stil don't work.. i always put that..









Код:
CMD:cc(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 1)
    {
        new cMsg[128], pName[MAX_PLAYER_NAME];
        for(new c; c < 25; c++)
        {
            SendClientMessage(playerid, COLOR_RED, "    ");
        }
        format(cMsg, sizeof(cMsg), "[Chat]: Admin %s je ocistio chat.", pName);
        SendClientMessage(playerid, COLOR_LIGHTBLUE, cMsg);
        SendClientMessage(playerid, COLOR_LIGHTBLUE, "www.sx-rp.info"); return 1;
    }
    else SendClientMessage(playerid, COLOR_RED, "[ERROR]: Nisi Admin!");
    return 1;
}
//==============================================================================
public OnPlayerCommandReceived(playerid, cmdtext[])
{
    return 1;
}
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
	new string[256];
	new playermoney;
	new sendername[MAX_PLAYER_NAME];
	new giveplayer[MAX_PLAYER_NAME];
	new playername[MAX_PLAYER_NAME];
	new cmd[256];
	new tmp[256];
	new giveplayerid, moneys, idx;
	cmd = strtok(cmdtext, idx);
That's have look in my gm.. :S
Reply
#5

pawn Код:
CMD:cc(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 1)
    {
        new cMsg[128], pName[MAX_PLAYER_NAME];
        for(new c; c < 25; c++)
        {
            SendClientMessage(playerid, COLOR_RED, "    ");
        }
        format(cMsg, sizeof(cMsg), "[Chat]: Admin %s je ocistio chat.", pName);
        SendClientMessage(playerid, COLOR_LIGHTBLUE, cMsg);
        SendClientMessage(playerid, COLOR_LIGHTBLUE, "www.sx-rp.info");
        return 1;
    }
    else SendClientMessage(playerid, COLOR_RED, "[ERROR]: Nisi Admin!");
    return 1;
}
That should work, are you sure you are typing the same command? Can you post the whole of your OnPlayerCommandPerformed aswell please?
Reply
#6

I had the same when I had around 20 ZCMD commands. I converted around 200 ZCMD commands to DCMD, and since that it was working again.
Reply
#7

Stil don't work.. :S
I'm not typing same command's..
Pls help again?
Reply
#8

Are you returning 0 anywhere in OnPlayerCommandPerformed?
Reply
#9

Edit: Double post, lol, please remove >.>
Reply
#10

Quote:
Originally Posted by linuxthefish
Посмотреть сообщение
Are you returning 0 anywhere in OnPlayerCommandPerformed?
Thank u !


PROBLEM SOLVED! :d
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)