Problem With Commands
#1

i made this Cmd
Код:
if (strcmp("/help", cmdtext, true, 10) == 0)
    {
    ShowPlayerDialog(playerid, 0, 0, "{FF0000}Help", "This is World Revoloution Team DeathMatch \n  ", "Close", "");
	return 1;
    }
When i use it IG
it shows
Server Unknown Command


Help me Please
Reply
#2

It's been so damn long since I've used strcmp but I think it should be "if(!strcmp..." I'm not sure but might as well go to ZCMD, it's fast, easy and way better, good luck
Reply
#3

thank you .. i will try it .. but can someone tell me the answer ??
+ another Zcmd problem

Command
Код:
CMD:help(playerid,params[])
    {
    ShowPlayerDialog(playerid, 0, 0, "{FF0000}Help", "This is World Revoloution Team DeathMatch \n  ", "Close", "");
	return 1;
    }
errors
Код:
E:\НУЗг жЪбЗБ жГбЪЗИ\NewTDM\gamemodes\GM1.pwn(378) : error 029: invalid expression, assumed zero
E:\НУЗг жЪбЗБ жГбЪЗИ\NewTDM\gamemodes\GM1.pwn(378) : error 017: undefined symbol "cmd_help"
E:\НУЗг жЪбЗБ жГбЪЗИ\NewTDM\gamemodes\GM1.pwn(378) : error 029: invalid expression, assumed zero
E:\НУЗг жЪбЗБ жГбЪЗИ\NewTDM\gamemodes\GM1.pwn(378) : fatal error 107: too many error messages on one line
Reply
#4

It should be yes, !strcmp.
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
     if(!strcmp(cmdtext, "/help"))
     {
        SendClientMessage(playerid, 0xFFFFFFFF, "Whatever you want here.");
        return 1;
     }
     return 0;
}
Reply
#5

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/help"))
    {
    ShowPlayerDialog(playerid, 0, 0, "{FF0000}Help", "This is World Revoloution Team DeathMatch \n  ", "Close", "");
    return 1;
    }
    return 0;
}
Same problem : Server Unknown Command .
the strange iam using other FS and everything is just fine in them
Reply
#6

Quote:
Originally Posted by hossa
Посмотреть сообщение
thank you .. i will try it .. but can someone tell me the answer ??
+ another Zcmd problem

Command
Код:
CMD:help(playerid,params[])
    {
    ShowPlayerDialog(playerid, 0, 0, "{FF0000}Help", "This is World Revoloution Team DeathMatch \n  ", "Close", "");
	return 1;
    }
errors
Код:
E:\НУЗг жЪбЗБ жГбЪЗИ\NewTDM\gamemodes\GM1.pwn(378) : error 029: invalid expression, assumed zero
E:\НУЗг жЪбЗБ жГбЪЗИ\NewTDM\gamemodes\GM1.pwn(378) : error 017: undefined symbol "cmd_help"
E:\НУЗг жЪбЗБ жГбЪЗИ\NewTDM\gamemodes\GM1.pwn(378) : error 029: invalid expression, assumed zero
E:\НУЗг жЪбЗБ жГбЪЗИ\NewTDM\gamemodes\GM1.pwn(378) : fatal error 107: too many error messages on one line
1. Make sure you have Sscanf and ZCMD by the way
2. this is how it goes:
pawn Код:
CMD:help(playerid, params[])
{
     // Place here whatever function you want.
     return 1;
}
Reply
#7

still shows same problems D:
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)