Can't add mutiple commands
#1

Hi, i'm really new to pawno and i would like your advice(s) about this issue i'm having:
I Add my own command using the blank spot in the "New code", everything goes right:
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp("/help", cmdtext, true, 10) == 0)
	{
	SendClientMessage(playerid, 0x336600, "[OBJECTIVE]");
	SendClientMessage(playerid, 0xCCCC00, "Your goal is to kill other players. Enjoy!");

	return 1;
	}
	return 0;
}
but, when i add another command like that:
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp("/help", cmdtext, true, 10) == 0)
	{
	SendClientMessage(playerid, 0x336600, "[OBJECTIVE]");
	SendClientMessage(playerid, 0xCCCC00, "Your goal is to kill other players. Enjoy!");

	return 1;
	}
if (strcmp("/cmd2", cmdtext, true, 10) == 0)
	{
	SendClientMessage(playerid, 0x336600, "[CMD2]");
	SendClientMessage(playerid, 0xCCCC00, "This is the second Comamand!");

	return 1;
	return 0;
}
I Get this eror:
Код:
C:\Documents and Settings\Zohar\Desktop\HOST\Server\gamemodes\k.pwn(110) : warning 209: function "OnPlayerCommandText" should return a value
Can anyone give me a proper example for a right usage of
Код:
OnPlayerCommandText
?

Thanks anyway,
Zohar.
Reply


Messages In This Thread
Can't add mutiple commands - by Anotniomontana - 13.08.2010, 18:16
Re: Can't add mutiple commands - by Ihsan_Cingisiz - 13.08.2010, 18:19
Re: Can't add mutiple commands - by Double-O-Seven - 13.08.2010, 18:23
Re: Can't add mutiple commands - by Anotniomontana - 13.08.2010, 22:09

Forum Jump:


Users browsing this thread: 1 Guest(s)