SA-MP Forums Archive
Major Problem - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Major Problem (/showthread.php?tid=152253)



Major Problem - TheNuttyScientist - 03.06.2010

In my gamemode, there are commands with text. I now have a major error.

I have a /help command, and everytime I type another command, it shows the text that /help sends.

Any ideas of what could be causing this?


Re: Major Problem - Think - 03.06.2010

Nope, not unless you post maybe your help command and if thats not enough the whole 'OnPlayerCommand' thing.


Re: Major Problem - TheNuttyScientist - 03.06.2010

Here:

pawn Код:
if(strcmp(cmd, "/help", true) == 0) {
        SendClientMessage(playerid, COLOR_GREEN, "BlackBlood's freeroam: Created by [TLA]BlackBlood.");
        SendClientMessage(playerid, COLOR_YELLOW, "Type: /genhelp for general help.");
        SendClientMessage(playerid, COLOR_YELLOW, "Type: /moneyhelp for information about earning money.");
        SendClientMessage(playerid, COLOR_YELLOW, "Type: /languagehelp for information about languages.");
        SendClientMessage(playerid, COLOR_YELLOW, "Type: /adminhelp for information about the admins and becoming one.");
        SendClientMessage(playerid, COLOR_YELLOW, "Type: /cmds for the commands.");
        SendClientMessage(playerid, COLOR_YELLOW, "Type: /rules for this server's rules.");
  return 1;
  }



Re: Major Problem - TheNuttyScientist - 03.06.2010

BUMP: Help me. I'm desperate.


Re: Major Problem - ViruZZzZ_ChiLLL - 03.06.2010

Uhhh.. I kinda don't get your problem :/
kindly clearly explain it again


Re: Major Problem - TheNuttyScientist - 03.06.2010

Well everytime I type in a command, the text that is supposed to be sent went /help is typed appears.


Re: Major Problem - reallifescript - 03.06.2010

Does anybody get it? I don't understand his english


Re: Major Problem - TheNuttyScientist - 03.06.2010

Quote:
Originally Posted by reallifescript
Does anybody get it? I don't understand his english
Ugh...

Look, the command seems to be bugged. When I type something like /cmds, it shows /help.


Re: Major Problem - kaisersouse - 03.06.2010

Quote:
Originally Posted by BlackBlood1337
Quote:
Originally Posted by reallifescript
Does anybody get it? I don't understand his english
Ugh...

Look, the command seems to be bugged. When I type something like /cmds, it shows /help.
I understand what you mean. I don't see why people are having such a hard time getting it

Paste your ENTIRE OnPlayerCommandText callback in pastebin.com and post the link here. I think I know whats wrong, but I need to see the entire thing in order to confirm it.


Re: Major Problem - DJDhan - 03.06.2010

Here you go:
Код:
if(!strcmp(cmd, "/help", true,5))
{
SendClientMessage(playerid, COLOR_GREEN, "BlackBlood's freeroam: Created by [TLA]BlackBlood.");
SendClientMessage(playerid, COLOR_YELLOW, "Type: /genhelp for general help.");
SendClientMessage(playerid, COLOR_YELLOW, "Type: /moneyhelp for information about earning money.");
SendClientMessage(playerid, COLOR_YELLOW, "Type: /languagehelp for information about languages.");
SendClientMessage(playerid, COLOR_YELLOW, "Type: /adminhelp for information about the admins and becoming one.");
SendClientMessage(playerid, COLOR_YELLOW, "Type: /cmds for the commands.");
SendClientMessage(playerid, COLOR_YELLOW, "Type: /rules for this server's rules.");
  return 1;
}
Use this "strcmp format" for all your commands.


Re: Major Problem - Jonni8 - 03.06.2010

try this:

pawn Код:
if(strcmp(cmd, "/help", true) == 0) {
        SendClientMessage(playerid, COLOR_GREEN, "BlackBlood's freeroam: Created by [TLA]BlackBlood.");
        SendClientMessage(playerid, COLOR_YELLOW, "Type: /genhelp for general help.");
        SendClientMessage(playerid, COLOR_YELLOW, "Type: /moneyhelp for information about earning money.");
        SendClientMessage(playerid, COLOR_YELLOW, "Type: /languagehelp for information about languages.");
        SendClientMessage(playerid, COLOR_YELLOW, "Type: /adminhelp for information about the admins and becoming one.");
        SendClientMessage(playerid, COLOR_YELLOW, "Type: /cmds for the commands.");
        SendClientMessage(playerid, COLOR_YELLOW, "Type: /rules for this server's rules.");
}
return 1;



Re: Major Problem - TheNuttyScientist - 03.06.2010

Quote:
Originally Posted by kaisersouse
I understand what you mean. I don't see why people are having such a hard time getting it

Paste your ENTIRE OnPlayerCommandText callback in pastebin.com and post the link here. I think I know whats wrong, but I need to see the entire thing in order to confirm it.
Link:

http://pastebin.com/LrCLk7rr