Text Parameter?
#3

Without any other function
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;
}
Dcmd
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"
}
Zcmd
pawn Код:
cmd_command(playerid, parameter[])
{
    if(parameter[0] == EOS)
        return SendClientMessage(playerid, 0xFFFFFFAA, "Right Usage: /command [text]");
    //the text would be "parameter"
}
Reply


Messages In This Thread
Text Parameter? - by lRaged - 06.04.2010, 21:22
Re: Text Parameter? - by aircombat - 06.04.2010, 21:27
Re: Text Parameter? - by Nero_3D - 06.04.2010, 21:36

Forum Jump:


Users browsing this thread: 1 Guest(s)