[Tutorial] /announce to textdraw
#6

Quote:
Originally Posted by Gazmull
View Post
Hi
Oh! If you want it for admins only:
pawn Code:
dcmd_Ann(playerid, params[])
{
    new AnnString[64]; //new string for announce texts
    if(sscanf(params, "s", AnnString)) return SendClientMessage(playerid, WRONG_COLOR, "Usage: /Ann [TEXT]"); //if you didn't put anything, just the /ann only
    else
    {
        TextDrawSetString(Ann, AnnString); //draws the text you typed
        TextDrawShowForAll(Ann); //to avoid errors
        SetTimer("HideAnn", 5000, false); //sets the timer for hiding the text in 5seconds
    }
    if(IsPlayerAdmin(playerid) == 0) return SendClientMessage(playerid, -1, "You ain't admin to use this command!"); //returns that he don't have right to use this command until he login as rcon admin
    return 1;
}
If you are not an admin and you type this command, it will still announce, right? This if(IsPlayerAdmin(playerid) == 0) should be inside else clause, I think.
Reply


Messages In This Thread
/announce to textdraw - by Gazmull - 12.07.2011, 15:26
Re: /announce to textdraw - by alpha500delta - 12.07.2011, 19:35
Re: /announce to textdraw - by grand.Theft.Otto - 12.07.2011, 20:01
Re: /announce to textdraw - by Gazmull - 13.07.2011, 12:51
Re: /announce to textdraw - by Lorenc_ - 13.07.2011, 13:10
Re: /announce to textdraw - by Roko_foko - 13.07.2011, 18:48
Re: /announce to textdraw - by Gazmull - 14.07.2011, 06:53
Re: /announce to textdraw - by SmileyForCheat - 14.07.2011, 07:26
Re: /announce to textdraw - by Gazmull - 15.07.2011, 09:59
Re: /announce to textdraw - by SmileyForCheat - 13.08.2011, 09:16

Forum Jump:


Users browsing this thread: 1 Guest(s)