13.08.2010, 18:16
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:
but, when i add another command like that:
I Get this eror:
Can anyone give me a proper example for a right usage of
?
Thanks anyway,
Zohar.
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; }
Код:
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; }
Код:
C:\Documents and Settings\Zohar\Desktop\HOST\Server\gamemodes\k.pwn(110) : warning 209: function "OnPlayerCommandText" should return a value
Код:
OnPlayerCommandText
Thanks anyway,
Zohar.