SA-MP Forums Archive
Problem With Commands - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Problem With Commands (/showthread.php?tid=421624)



Problem With Commands - hossa - 10.03.2013

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


Re: Problem With Commands - Sandiel - 10.03.2013

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


Re: Problem With Commands - hossa - 10.03.2013

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



Re: Problem With Commands - RajatPawar - 10.03.2013

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;
}



Re: Problem With Commands - hossa - 10.03.2013

Код:
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


Re: Problem With Commands - Sandiel - 10.03.2013

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;
}



Re: Problem With Commands - hossa - 10.03.2013

still shows same problems D: