TextDrawShowForPlayer(playerid, textdrawid);
/* Filterscript generated using Zamaroht's TextDraw Editor Version 1.0. Designed for SA-MP 0.3a. Time and Date: 2010-11-26 @ 20:25:1 Instructions: 1- Compile this file using the compiler provided with the sa-mp server package. 2- Copy the .amx file to the filterscripts directory. 3- Add the filterscripts in the server.cfg file (more info here: https://sampwiki.blast.hk/wiki/Server.cfg) 4- Run the server! Disclaimer: You have full rights over this file. You can distribute it, modify it, and change it as much as you want, without having to give any special credits. */ #include <a_samp> new Text:Textdraw0; new Text:Textdraw1; new Text:Textdraw2; public OnFilterScriptInit() { print("Textdraw file generated by"); print(" Zamaroht's textdraw editor was loaded."); // Create the textdraws: Textdraw0 = TextDrawCreate(4.000000, 430.000000, "Welcome to Stunt Revolution ! Visit Our Website, www.StuntRevolutionServer.tk !"); TextDrawBackgroundColor(Textdraw0, -65281); TextDrawFont(Textdraw0, 3); TextDrawLetterSize(Textdraw0, 0.410000, 1.800000); TextDrawColor(Textdraw0, 65535); TextDrawSetOutline(Textdraw0, 1); TextDrawSetProportional(Textdraw0, 1); Textdraw1 = TextDrawCreate(3.000000, 158.000000, "/Help /Rules"); TextDrawBackgroundColor(Textdraw1, 65535); TextDrawFont(Textdraw1, 3); TextDrawLetterSize(Textdraw1, 0.360000, 1.200000); TextDrawColor(Textdraw1, -65281); TextDrawSetOutline(Textdraw1, 1); TextDrawSetProportional(Textdraw1, 1); Textdraw2 = TextDrawCreate(2.000000, 143.000000, "/Teles /Anims"); TextDrawBackgroundColor(Textdraw2, 65535); TextDrawFont(Textdraw2, 3); TextDrawLetterSize(Textdraw2, 0.370000, 1.200000); TextDrawColor(Textdraw2, -65281); TextDrawSetOutline(Textdraw2, 1); TextDrawSetProportional(Textdraw2, 1); for(new i; i < MAX_PLAYERS; i ++) { if(IsPlayerConnected(i)) { TextDrawShowForPlayer(i, Textdraw0); TextDrawShowForPlayer(i, Textdraw1); TextDrawShowForPlayer(i, Textdraw2); } } return 1; } public OnFilterScriptExit() { TextDrawHideForAll(Textdraw0); TextDrawDestroy(Textdraw0); TextDrawHideForAll(Textdraw1); TextDrawDestroy(Textdraw1); TextDrawHideForAll(Textdraw2); TextDrawDestroy(Textdraw2); return 1; } public OnPlayerConnect(playerid) { TextDrawShowForPlayer(playerid, Textdraw0); TextDrawShowForPlayer(playerid, Textdraw1); TextDrawShowForPlayer(playerid, Textdraw2); return 1; }
OnPlayerConnect isn't called from filterscripts for some reason. Maybe a bug.
|
new Text:Textdraw0;
new Text:Textdraw1;
new Text:Textdraw2;
public OnGameModeInit()
{
Textdraw0 = TextDrawCreate(4.000000, 430.000000, "Welcome to Stunt Revolution ! Visit Our Website, http://www.StuntRevolutionServer.tk !");
TextDrawBackgroundColor(Textdraw0, -65281);
TextDrawFont(Textdraw0, 3);
TextDrawLetterSize(Textdraw0, 0.410000, 1.800000);
TextDrawColor(Textdraw0, 65535);
TextDrawSetOutline(Textdraw0, 1);
TextDrawSetProportional(Textdraw0, 1);
Textdraw1 = TextDrawCreate(3.000000, 158.000000, "/Help /Rules");
TextDrawBackgroundColor(Textdraw1, 65535);
TextDrawFont(Textdraw1, 3);
TextDrawLetterSize(Textdraw1, 0.360000, 1.200000);
TextDrawColor(Textdraw1, -65281);
TextDrawSetOutline(Textdraw1, 1);
TextDrawSetProportional(Textdraw1, 1);
Textdraw2 = TextDrawCreate(2.000000, 143.000000, "/Teles /Anims");
TextDrawBackgroundColor(Textdraw2, 65535);
TextDrawFont(Textdraw2, 3);
TextDrawLetterSize(Textdraw2, 0.370000, 1.200000);
TextDrawColor(Textdraw2, -65281);
TextDrawSetOutline(Textdraw2, 1);
TextDrawSetProportional(Textdraw2, 1);
return 1;
}
public OnGameModeExit()
{
TextDrawDestroy(Textdraw0);
TextDrawDestroy(Textdraw1);
TextDrawDestroy(Textdraw2);
return 1;
}
public OnPlayerConnect(playerid)
{
TextDrawShowForPlayer(playerid, Textdraw0);
TextDrawShowForPlayer(playerid, Textdraw1);
TextDrawShowForPlayer(playerid, Textdraw2);
return 1;
}