Why isnt this working?
#1

pawn Код:
if(strcmp(cmd, "/announce", true) == 0)
    {
        if(pInfo[playerid][Admin] > 0)
        {
            tmp = strtok(cmdtext,idx), tmp2 = strtok(cmdtext,idx);
            new Announce;
            Announce = strval(tmp);
            if(!strlen(tmp))

         {
             SendClientMessage(playerid, COLOR_YELLOW, "USAGE: /announce [message]");
         }
                        else
         {


        format( string, sizeof(string), "%s", Announce );
        GameTextForAll(string, 5000, 4 );
                        }
                }
                return 1;
}
Reply
#2

bump
Reply
#3

pawn Код:
command(announce, playerid, params[])
{
    new string[128];
    if(pInfo[playerid][Admin] > 0)
    {
        if(sscanf(params,  "s[128]", string)) return SendClientMessage(playerid, COLOR_YELLOW, "USAGE: /announce [message]");
        else
        {
            GameTextForAll(string, 5000, 4);
        }
    }
    return 1;
}
Reply
#4

Код:
new Announce;
Announce = strval(tmp);
Quote:
Originally Posted by Y-Less
It works perfectly.
Reply
#5

Quote:
Originally Posted by Cameltoe
Посмотреть сообщение
pawn Код:
command(announce, playerid, params[])
{
    new string[128];
    if(pInfo[playerid][Admin] > 0)
    {
        if(sscanf(params,  "s[128]", string)) return SendClientMessage(playerid, COLOR_YELLOW, "USAGE: /announce [message]");
        else
        {
            GameTextForAll(string, 5000, 4);
        }
    }
    return 1;
}
I ask for a solution, not for a total new script, but anyways thanks.]
Someone has a solution?
Reply
#6

Quote:
Originally Posted by ******
Посмотреть сообщение
Yes, you just ignored it:
That plus:

Quote:
Originally Posted by geerdinho8
Посмотреть сообщение
I ask for a solution, not for a total new script, but anyways thanks.]
Someone has a solution?
I didn't write a new script i made it more efficient.
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)