unknown command please help
#3

Quote:
Originally Posted by FuNkYTheGreat
Посмотреть сообщение
because your returning 0
Replace it
Код:
	return 0; // shows unknown command else.
}
with
Код:
	return 1; // shows unknown command else.
}
*cough*
https://sampwiki.blast.hk/wiki/OnPlayerCommandText
Quote:

public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/help", true))
{
SendClientMessage(playerid, -1, "SERVER: This is the /help command!");
return 1;
// Returning 1 informs the server that the command has been processed.
// OnPlayerCommandText won't be called in other scripts.
}
return 0;
// Returning 0 informs the server that the command hasn't been processed by this script.
// OnPlayerCommandText will be called in other scripts until one returns 1.
// If no scripts return 1, the 'SERVER: Unknown Command' message will be shown to the player.
}

Reply


Messages In This Thread
unknown command please help - by CarRamper - 10.07.2016, 10:48
Re: unknown command please help - by FuNkYTheGreat - 10.07.2016, 11:27
Re: unknown command please help - by Luicy. - 10.07.2016, 11:32
Re: unknown command please help - by CarRamper - 10.07.2016, 11:33

Forum Jump:


Users browsing this thread: 1 Guest(s)