Textdraws aint showing !
#1

Hello.. I made a textdraw yeasterday with that ingame editor that seems to be so popular, the one that you go ingame and do /text and you get a dialog and blablabla... so i made the textdraw, i exported it, took the .pwn file, compiled, puted to .amx in filterscripts, added "testdraws" in filterscripts line in my server.cfg but it aint showing! what can be wrong? i tried once before to but didnt work that time either..

Reply
#2

Show your code or we can't help. On another note because you have blocked it out i cant tell how many filterscripts you have, the max is 16, any after that won't load. Have a look in your server log to see if the filterscript actually loaded.
Reply
#3

Maybe you should put on player connect:

pawn Код:
TextDrawShowForPlayer(playerid, textdrawid);
Reply
#4

It is made as a self working filterscript with the ingame textdraw editor, i should not have to edit anything, and i got 10 filterscripts loaded, and it stands in the server log that it have been loaded! but heres the code..

Код:
/*
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;
}
Reply
#5

I found something wierd with that code, by all means it should work, but it doesnt show when a player connects (from what i can tell it should). If you reload the fs ingame the textdraws do show. Try showing them in OnPlayerSpawn. Or some other callback that gets called early like OnPlayerRequestClass.
Reply
#6

OnPlayerConnect isn't called from filterscripts for some reason. Maybe a bug.
Reply
#7

huh? how to do that then? xD

edit: Mademan, there are like 2 million comments on that textdraw editor here on forum, every single comment have said like, Works flawless ! not bugs no errors, just export and use ! ...
Reply
#8

Quote:
Originally Posted by MadeMan
Посмотреть сообщение
OnPlayerConnect isn't called from filterscripts for some reason. Maybe a bug.
WOW i didn't know that, i'll need to do some serious editing to my fs'. Thanks for the info.

Kitten put the code thats in OnPlayerConnect into OnPlayerRequestClass. Done should work.
Reply
#9

You can put the code into your gamemode.

pawn Код:
new Text:Textdraw0;
new Text:Textdraw1;
new Text:Textdraw2;
pawn Код:
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;
}
pawn Код:
public OnGameModeExit()
{
    TextDrawDestroy(Textdraw0);
    TextDrawDestroy(Textdraw1);
    TextDrawDestroy(Textdraw2);
    return 1;
}
pawn Код:
public OnPlayerConnect(playerid)
{
    TextDrawShowForPlayer(playerid, Textdraw0);
    TextDrawShowForPlayer(playerid, Textdraw1);
    TextDrawShowForPlayer(playerid, Textdraw2);
    return 1;
}
Reply
#10

Much better solution^^
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)