SA-MP Forums Archive
Announce Command bugged - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Announce Command bugged (/showthread.php?tid=390038)



Announce Command bugged - tpolis - 04.11.2012

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


Re: Announce Command bugged - tyler12 - 04.11.2012

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;




Re: Announce Command bugged - verlaj - 04.11.2012

you can also use YCMD or DCMD