/help doesn't work! -
samtey - 31.07.2011
Hi!
I've created a command, but not in CMD! When a normal player types /help, the information should be shown!
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext[0], "/help"))
{
SendClientMessage(playerid, COLOR_RED, "Hi there! Welcome to Gangwars and Ganglife at Night ");
SendClientMessage(playerid, COLOR_RED, "The most gang-banging in Los Angeles are happening at night!");
SendClientMessage(playerid, COLOR_RED, "Now it's your turn! Choose your favourite gang and show, that you and your homies are the best!");
SendClientMessage(playerid, COLOR_RED, "Remember, you can't betray your gang!");
SendClientMessage(playerid, COLOR_RED, "Use every situation to attack your enemies! Your target is, to take over whole Los Santos with your gang!");
return 1;
}
return 0;
}
Re: /help doesn't work! -
Jay. - 31.07.2011
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/help", true) == 0)
{
SendClientMessage(playerid, COLOR_RED, "Hi there! Welcome to Gangwars and Ganglife at Night ");
SendClientMessage(playerid, COLOR_RED, "The most gang-banging in Los Angeles are happening at night!");
SendClientMessage(playerid, COLOR_RED, "Now it's your turn! Choose your favourite gang and show, that you and your homies are the best!");
SendClientMessage(playerid, COLOR_RED, "Remember, you can't betray your gang!");
SendClientMessage(playerid, COLOR_RED, "Use every situation to attack your enemies! Your target is, to take over whole Los Santos with your gang!");
return 1;
}
return 0;
}
i'm not really sure..
AW: /help doesn't work! -
samtey - 31.07.2011
Nice, but it didn't work!

What could it be? Should I put a ! before strcmp?
AW: /help doesn't work! -
samtey - 31.07.2011
any help

I'm getting crazy I need this command!
Re: /help doesn't work! -
Davz*|*Criss - 31.07.2011
I suggest you to download
Zcmd.
And on the top:
And put this Zcmd command anywhere in script you would like.
pawn Код:
COMMAND:help(playerid, params[])
{
SendClientMessage(playerid, COLOR_RED, "Hi there! Welcome to Gangwars and Ganglife at Night ");
SendClientMessage(playerid, COLOR_RED, "The most gang-banging in Los Angeles are happening at night!");
SendClientMessage(playerid, COLOR_RED, "Now it's your turn! Choose your favourite gang and show, that you and your homies are the best!");
SendClientMessage(playerid, COLOR_RED, "Remember, you can't betray your gang!");
SendClientMessage(playerid, COLOR_RED, "Use every situation to attack your enemies! Your target is, to take over whole Los Santos with your gang!");
return 1;
}
This must work if you put it correctly.
And there is no bugs/errors.
Thanks
Davz~
AW: /help doesn't work! -
samtey - 31.07.2011
I got zcmd, I only didn't know how to do it with zcmd^^ thanks
Re: /help doesn't work! -
Davz*|*Criss - 31.07.2011
You got Team viewer? Or something i could help you on that. :0
Re: /help doesn't work! -
Kaperstone - 31.07.2011
look on the difference:
your:
pawn Код:
if(strcmp(cmdtext[0], "/help"))
his script :
pawn Код:
if(strcmp(cmdtext, "/help", true) == 0)
the line is not done yet..
you need to finish the line...if you want it to work..