Help Zcmd
#5

this, and other functions do not work

pawn Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
if(!success) return SendClientMessage(playerid, 0xFF0000FF, "The command does not exist");//This mesagge
return 1;
}

pawn Код:
new pos, funcname[MAX_FUNC_NAME];
    while(cmdtext[++pos] > ' ')
    {
        funcname[pos-1] = tolower(cmdtext[pos]);
    }
    format(funcname, sizeof(funcname),"_%s",funcname);
    while(cmdtext[pos] == ' ') pos++;
    if(!cmdtext[pos])
    {
        if(CallLocalFunction(funcname, "is", playerid, "\1"))
            return 1;
    }
    if(CallLocalFunction(funcname, "is", playerid, cmdtext[pos]))
        return 1;

    PlayerPlaySound(playerid, 1009, 0, 0, 0);
    return UnknownCommand(playerid);

}
already solved thanks
Reply


Messages In This Thread
Help Zcmd - by INKISICION - 27.01.2015, 05:22
Re: Help Zcmd - by ATGOggy - 27.01.2015, 06:11
Re: Help Zcmd - by INKISICION - 27.01.2015, 06:23
Re: Help Zcmd - by ATGOggy - 27.01.2015, 06:28
Re: Help Zcmd - by INKISICION - 27.01.2015, 06:33
Re: Help Zcmd - by Excel™ - 27.01.2015, 07:41
Re: Help Zcmd - by Razturach - 27.01.2015, 10:53

Forum Jump:


Users browsing this thread: 1 Guest(s)