Announce Command bugged
#1

Quote:

COMMAND:announce(playerid, params[])
{

// Send the command to all admins so they can see it
SendAdminText(playerid, "/announce", params);

// Check if the player has logged in
if (APlayerData[playerid][LoggedIn] == true)
{
// Check if the player's admin-level is at least 1
if (APlayerData[playerid][PlayerLevel] >= 1)
{
if(sscanf(params)) return SendClientMessage(playerid,0x0000BBAA, "USAGE: /an(nounce) [message]");
else
{
GameTextForAll(params, 3800, 6);
return 1;
}
}
else
return 0;
}
else
return 0;

// Let the server know that this was a valid command
return 1;
}

This command works but in the chat says unknown command after execution. Please help me. What's wrong with it?
Forgot to say: I tried some things so it may be not working in this state. Please help me fix it.
Ty in advance, Radi
Reply
#2

PHP код:
COMMAND:announce(playerid,params[])
{
    
SendAdminText(playerid"/announce"params);
    if(
APlayerData[playerid][LoggedIn] == true)
    {
        if(
APlayerData[playerid][PlayerLevel] >= 1)
        {
            new 
message[64];
            if(
sscanf(params,"s[64]",message)) return SendClientMessage(playerid,-1,"USAGE:/announce [message]");
            
GameTextForAll(message38006);
        }
    }
    return 
1;

Reply
#3

you can also use YCMD or DCMD
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)