/sms command not working.
#1

So what I was trying to do, was create an /sms command by taking the /pm command from 'base' filterscript that you get when you download server files. In this command, I'm using a player variable for the phone number.

Here is the command:
pawn Код:
//Check out the latest post by me.
Here is the strrest stock:
pawn Код:
stock strrest(const string[], &index)
{
    new length = strlen(string);
    while ((index < length) && (string[index] <= ' '))
    {
        index++;
    }
    new offset = index;
    new result[128];
    while ((index < length) && ((index - offset) < (sizeof(result) - 1)))
    {
        result[index - offset] = string[index];
        index++;
    }
    result[index - offset] = EOS;
    return result;
}
I was trying to make the command check if the player has the number typed in, he receives the message. Such as, if John's phone number is 3000, then he receives a message from James, whose number is 3500. Basically the command should work like "/sms 3000 Hey, what's up?". But now it doesn't work. When I type in both parameters it does nothing, just plain nothing, but if I miss both parameters, it gives two messages saying "Usage: /sms [number] [message]". So can anybody please help me? And please, don't tell me to switch to ZCMD, I already made like a million commands with the current format.
Reply


Messages In This Thread
/sms command not working. - by Gytis0 - 16.06.2012, 22:52
Re: /sms command not working. - by mickos - 16.06.2012, 23:14
Re: /sms command not working. - by [NWA]Hannes - 16.06.2012, 23:17
Re: /sms command not working. - by Gytis0 - 16.06.2012, 23:53
Re: /sms command not working. - by Gytis0 - 19.06.2012, 16:46
Re: /sms command not working. - by Revo - 19.06.2012, 16:53
Re: /sms command not working. - by Gytis0 - 19.06.2012, 22:04
Re: /sms command not working. - by Gytis0 - 22.06.2012, 10:07
Re: /sms command not working. - by nilanjay - 22.06.2012, 10:13
Re: /sms command not working. - by Gytis0 - 27.06.2012, 17:59

Forum Jump:


Users browsing this thread: 2 Guest(s)