Commands are not showing..
#1

Okay i've a proplem with commands.. When i type it it doesnt show anything..

Such as:

pawn Код:
CMD:mole(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] < 3)
    {
        SendClientMessage(playerid, COLOR_GREY, "You're not authorized to use that command!");
        return 1;
    }
    new string[128];
    if(isnull(params)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /mole [mole text]");

    format(string, sizeof(string), "SMS: %s, Sender: MOLE (555)",params);
    SendClientMessageToAllEx(COLOR_YELLOW, string);
    return 1;
}
Its not showing compltley

and..

pawn Код:
if(sscanf(params, "s[32]dD", choice, bizid, amount))
    {
        SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /bedit [name] [bizid] [optional amount]");
        SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Commands: Exterior | Interior | Vault | Type | Price | Delete | Supplies");
        return 1;
    }
Its not showing this too!.. So please i need your help.
Reply
#2

I am not sure if this is the problem since I 've never used the isnull function, but perhaps using isnull and sscanf in the same script causes this. Try using in every command either only sscanf or only isnull.
Reply
#3

Tried that way, Not working..
Reply
#4

try using strlen insted.

pawn Код:
#define MINIMUM_MOLE_TEXT (5) // Change this to whatever you want the minimum to be.

if(strlen(params) < MINIMUM_MOLE_TEXT) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /mole [mole text]");
Reply
#5

Nothing happened.!
Reply
#6

Why don't you change it to sscanf? It seems easier to work with IMO.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)