Posts: 10
Threads: 1
Joined: Feb 2008
Reputation:
0
public OnPlayerCommandText(playerid, cmdtext[] )
{
if (strcmp(cmdtext, "/commands", true) == 0)
{
SendClientMessage(playerid, 0xEFEFF7AA, "List of Commands: /rules /gunnerzisawesome");
return 1;
}
if (strcmp(cmdtext, "/rules", true) == 0)
{
SendClientMessage(playerid, 0xEFEFF7AA, "This would be the rules.");
SendClientMessage(playerid, 0xEFEFF7AA, "First Rule: You do not talk about Fight Club");
SendClientMessage(playerid, 0xEFEFF7AA, "Second Rule: You do NOT talk about Fight Club");
SendClientMessage(playerid, 0xEFEFF7AA, "Third Rule: If someone says "Stop" or goes limp, taps out the fight is over.");
return 1;
}
return 0;
}
Posts: 797
Threads: 21
Joined: Jan 2007
Reputation:
0
Download a script like LVDMOD and look how they did it with strtok. It makes it easier for commands that need multiple parameters, like /kick [id] [reason] etc..