NEED BIG HELP!
#6

zcmd has params in it.
You SHOULD NOT use sscanf if you're only using a string.

pawn Код:
command(b, playerid, params[])
{
    new string[129];
    if(isnull(params)) // zcmd has parmas and isnull, use them if you're only going to use a string.
    {
        SendClientMessage(playerid, WHITE, "SYNTAX: /b [message]");
    }
    else
    {
        if(!IsPlayerConnectedEx(playerid))
        {
            return 1;
        }
        else
        {
            if(Player[playerid][PrisonID] == 1)
            {
                SendClientMessage(playerid, WHITE, "You may not use this channel right now.");
            }
            else
            {
                format(string, sizeof(string), "(( %s says: %s )) ", GetName(playerid), params);
                NearByMessage(playerid, WHITE, string);
            }
        }
    }
    return 1;
}
Reply


Messages In This Thread
NEED BIG HELP! - by Ciarannn - 03.08.2014, 15:26
Re: NEED BIG HELP! - by Steel_ - 03.08.2014, 15:28
Re: NEED BIG HELP! - by Stinged - 03.08.2014, 15:31
Re: NEED BIG HELP! - by Ciarannn - 03.08.2014, 15:31
Re: NEED BIG HELP! - by Ciarannn - 03.08.2014, 15:33
Re: NEED BIG HELP! - by Stinged - 03.08.2014, 15:36
Re: NEED BIG HELP! - by Ciarannn - 03.08.2014, 15:44

Forum Jump:


Users browsing this thread: 1 Guest(s)