My commands arnt work!
#1

This is what I got, it compiles and everything but when I test it out I get unknown command. It did the same thing with the /kill command. please help!

public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/help()", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid, 0xFFFF00AA, "(INFO) Welcome to my Server's HELP command!");
SendClientMessage(playerid, 0xFFFF00AA, "(INFO) Hope you enjoy the tutorial!");
return 1;
}
return 0;
}
Reply
#2

PHP код:

public OnPlayerCommandText(playeridcmdtext[])
{
     if (!
strcmp("/help"cmdtexttrue5))
     {
          
SendClientMessage(playerid0xFFFF00AA"(INFO) Welcome to my Server's HELP command!");
          
SendClientMessage(playerid0xFFFF00AA"(INFO) Hope you enjoy the tutorial!");
          return 
1;
     }
     return 
0;

Reply
#3

that did nothing /;
Reply
#4

Try this:
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
     if (!strcmp("/help", cmdtext, true, 5))
     {
          SendClientMessage(playerid, 0xFFFF00AA, "(INFO) Welcome to my Server's HELP command!");
          SendClientMessage(playerid, 0xFFFF00AA, "(INFO) Hope you enjoy the tutorial!");  
     }
     return 1;
}
return 0;
Reply
#5

Actually i take that back /help doesnt work but when i type /whatever it pops up
Reply
#6

Still, have you tried my editation to the script?
Reply
#7

Never tired to try this?

pawn Код:
if(!strcmp("/help", cmdtext, true))
Reply
#8

RollTI you are my hero
Reply
#9

Quote:
Originally Posted by Michael_Cuellar
Посмотреть сообщение
RollTI you are my hero
don't know that the code i give will work actually i didn't try and test the code i just script it in new.pwn then post the code here

RollTi you are my hero

hehehehehe thanks
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)