SA-MP Forums Archive
Admin announce command - 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: Admin announce command (/showthread.php?tid=458013)



Admin announce command - efrim123 - 14.08.2013

well i wanted to make a admin announce command
for ppc trucking gamemode and it dosent works please help

Код:
// Announces a message to the server
COMMAND:adannounce(playerid, params[])
{
    // Send the command to all admins so they can see it
	SendAdminText(playerid, "/adannounce", params);
	
	// Check if the player has logged in
	if (APlayerData[playerid][LoggedIn] == true
	{
	    // Check if the playr's admin-level is at least 1
		if (APlayerData[playerid][PlayerLevel] >= 1)
		{
		    // Send everyone get the announcement
			GameTextForAll(MSG, 5000, 3);
			
		}
                else
                    return 0;
       }
       else
            return 0;
    
       // Let the server know that this was a valid command
       return 1;
}



Re: Admin announce command - Jefff - 14.08.2013

Change MSG to params


Re: Admin announce command - efrim123 - 14.08.2013

thx it worked and i had another problem after the == true i hade to fix it to
if (APlayerData[playerid][LoggedIn] == true)