Hello There, Guest! Login or Register


Useful Functions/Snippets/Commands
#8
(04-23-2008, 04:54 PM)Jay link Wrote: Well, thats what I get for not properly looking over and testing my code :P

Thanks for pointing it out, fixed.
No problem  ;) we all get tired somtime


Quote:this section is nice 

Errr... i have a problem idk how 2 send a pm to a player from rcon. this is the code for that:


theres nothing wrong with that code. you probebly didn't define argpos its here if u need it put it in your script but not in a callback:

Code:
argpos(const string[], idx = 0, sep = ' ')// (by yom)
{
    for(new i = idx, j = strlen(string); i < j; i++)
        if (string[i] == sep && string[i+1] != sep)
            return i+1;

    return -1;
}


also i figured u copied that code from ladmin :P anyway with  "Invalid command length (exceeding 50 characters)"
you might want to return false instead of true to stop the proccess. :)

ohh and i 4got u have to defien maX_playerid to your script to
so add

Code:
new max_playerid = 0;

to your script :)

or you can do

Code:
#define max_playerid 0

:) hope i helped

i will add some more stuff later  8)
Reply


Messages In This Thread
Useful Functions/Snippets/Commands - by Jay - 04-21-2008, 03:19 PM
Re: Useful Functions/Snippets/Commands - by Jay - 04-21-2008, 07:42 PM
Re: Useful Functions/Snippets/Commands - by Smoke - 04-23-2008, 06:50 AM
Re: Useful Functions/Snippets/Commands - by Jay - 04-23-2008, 04:54 PM
Re: Useful Functions/Snippets/Commands - by Smoke - 04-24-2008, 10:18 AM
Re: Useful Functions/Snippets/Commands - by Jay - 04-29-2008, 01:03 PM
Re: Useful Functions/Snippets/Commands - by Jay - 05-08-2008, 11:54 AM
Re: Useful Functions/Snippets/Commands - by Jay - 02-02-2009, 10:17 PM