Announce help
#9

pawn Код:
/*
This is how to do it with a textdraw but using GameTextForPlayer is more recommended
    ZCMD - Zeex
   (SSCANF)SSCANF2 - ******
*/


new Text:ann;
forward HideAnn();

public OnGameModeInit()
{
    ann = TextDrawCreate(320.000000, 240.000000, "_");
    TextDrawAlignment(ann, 2);
    TextDrawBackgroundColor(ann, 255);
    TextDrawFont(ann, 3);
    TextDrawLetterSize(ann, 1.0, 1.400003);
    TextDrawColor(ann, -1);
    TextDrawSetOutline(ann, 1);
    TextDrawSetProportional(ann, 1);
    return 1;
}

CMD:announce(playerid, params[])
{
   new string[256];
   if(sscanf(params, "s[256]", params)) return SendClientMessage(playerid, -1, "/announce [message]");
   format(string, sizeof(string), "%s", params);
   TextDrawSetString(ann, string);
   TextDrawShowForAll(ann);
   SetTimer("HideAnn", 10000, false);
   return 1;
}

public HideAnn()
{
   TextDrawHideForAll(ann);
   return 1;
}
Reply


Messages In This Thread
Announce help - by Ananisiki - 30.05.2013, 16:29
Re: Announce help - by mahdi499 - 30.05.2013, 16:36
Re: Announce help - by Konstantinos - 30.05.2013, 16:38
Re: Announce help - by RyanPetersons - 30.05.2013, 16:45
Re: Announce help - by Ananisiki - 30.05.2013, 16:48
Re: Announce help - by NathNathii - 30.05.2013, 16:48
Re: Announce help - by Pottus - 30.05.2013, 16:52
Re: Announce help - by Konstantinos - 30.05.2013, 16:52
Re: Announce help - by Glad2BeHere - 30.05.2013, 16:59
Re: Announce help - by Pottus - 30.05.2013, 17:06

Forum Jump:


Users browsing this thread: 1 Guest(s)