/makeadmin commad
#9

Under OnPlayerCommandText add

pawn Код:
new cmd[256];
new tmp[256];
new giveplayer[MAX_PLAYER_NAME];
new string[128];
cmd = strtok(cmdtext, idx);

Under OnGamemodeInit

pawn Код:
strtok(const string[], &index)
{
    new length = strlen(string);
    while ((index < length) && (string[index] <= ' '))
    {
        index++;
    }

    new offset = index;
    new result[20];
    while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
    {
        result[index - offset] = string[index];
        index++;
    }
    result[index - offset] = EOS;
    return result;
}

Define :
pawn Код:
#define COLOR_GRAD2 0xBFC0C2FF
Reply


Messages In This Thread
/makeadmin commad - by DannySnoopy - 18.08.2011, 13:42
Re: /makeadmin commad - by Pinguinn - 18.08.2011, 13:43
Re: /makeadmin commad - by DannySnoopy - 18.08.2011, 13:49
Re: /makeadmin commad - by ElieJabbour - 18.08.2011, 13:49
Re: /makeadmin commad - by PhoenixB - 18.08.2011, 13:49
Re: /makeadmin commad - by DannySnoopy - 18.08.2011, 13:53
Re: /makeadmin commad - by PhoenixB - 18.08.2011, 13:56
AW: /makeadmin commad - by umarmalik - 18.08.2011, 14:01
Re: /makeadmin commad - by ElieJabbour - 18.08.2011, 14:06
Re: /makeadmin commad - by DannySnoopy - 18.08.2011, 14:21
Re: /makeadmin commad - by Pinguinn - 18.08.2011, 14:47
Re: /makeadmin commad - by ElieJabbour - 18.08.2011, 14:52

Forum Jump:


Users browsing this thread: 1 Guest(s)