Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // FS Básico TextDraw Randomico Feito por: Nork
- #include <a_samp>
- new Text:randommsg;
- new RandomMessages[][] =
- {
- "Seu Texto",
- "Seu Texto",
- "Seu Texto",
- "Seu Texto"
- };
- public OnFilterScriptInit()
- {
- SetTimer("RandomMessage",6000,true);
- randommsg = TextDrawCreate(438.000000, 1.000000, " ");
- TextDrawBackgroundColor(randommsg, -16776961);
- TextDrawFont(randommsg, 1);
- TextDrawLetterSize(randommsg, 0.300000, 1.700000);
- TextDrawColor(randommsg, -1);
- TextDrawSetOutline(randommsg, 0);
- TextDrawSetProportional(randommsg, 1);
- TextDrawSetShadow(randommsg, 0);
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- forward RandomMessage();
- public RandomMessage()
- {
- TextDrawSetString(randommsg, RandomMessages[random(sizeof(RandomMessages))]);
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- TextDrawHideForPlayer(playerid, randommsg);
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- TextDrawShowForPlayer(playerid, randommsg);
- return 1;
- }
- public OnPlayerRequestClass(playerid, classid)
- {
- TextDrawHideForPlayer(playerid, randommsg);
- return 1;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- TextDrawHideForPlayer(playerid, randommsg);
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment