06.04.2010, 21:36
Without any other function
Dcmd
Zcmd
pawn Код:
if(strcmp("command", cmdtext[1], true, 7) && (cmdtext[8] == 32 || cmdtext[8] == EOS))
{
if(cmdtext[8] != 32 || cmdtext[9] == EOS)
return SendClientMessage(playerid, 0xFFFFFFAA, "Right Usage: /command [text]");
//the text would be "cmdtext[9]"
return 1;
}
pawn Код:
//OnPlayerCommandText
dcmd(command, 7, cmdtext); //7 is the length of "command"
pawn Код:
dcmd_command(playerid, parameter[])
{
if(parameter[0] == EOS)
return SendClientMessage(playerid, 0xFFFFFFAA, "Right Usage: /command [text]");
//the text would be "parameter"
}
pawn Код:
cmd_command(playerid, parameter[])
{
if(parameter[0] == EOS)
return SendClientMessage(playerid, 0xFFFFFFAA, "Right Usage: /command [text]");
//the text would be "parameter"
}

