Admin announce command
#1

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;
}
Reply
#2

Change MSG to params
Reply
#3

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


Forum Jump:


Users browsing this thread: 2 Guest(s)