27.05.2010, 10:53
How do i make random textdraw appear on the screen for every player. Kinda like Announcement system. It need to be easy to put a new line. :P
This is my current code, but it not appearing in my game.
This is my current code, but it not appearing in my game.
Код:
#include <a_samp> new Text:Text; public OnFilterScriptInit() { new var0[128]; format(var0, 128, " "); Text = TextDrawCreate(84.000000, 437.000000, var0); TextDrawLetterSize(Text, 0.430000, 1.000000); TextDrawSetOutline(Text, 1); TextDrawFont(Text, 1); TextDrawColor(Text, -1); TextDrawSetOutline(Text, 0); TextDrawSetProportional(Text, 1); TextDrawSetShadow(Text, 1); SetTimer("TextDraw", 5000, true); return 1; } //add this under ongamemodeinit new aMessage[4][128] = { {"Announcement 1"}, {"Announcement 2"}, {"Announcement 3"}, {"Announcement 4"} }; forward Timer(); public Timer() //SetTimer OnGameModeInit { TextDrawSetString(Text:Text, aMessage[random(sizeof(aMessage))]); TextDrawShowForAll(Text:Text); }