SA-MP Forums Archive
Textdraw bug - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Textdraw bug (/showthread.php?tid=663904)



Textdraw bug - RJTabish - 14.02.2019

hello sorry for another quick post but i'm facing problem in my textdraws actually i made some differennt textdraw
with timer idk what wrong with it but its seems like fine as i have experience but there is alot experience people in samp so have a look and give suggestion or help hand what i did wrong

PROBLEM >> problem is its working fine when someone is connecting ingame after spawning and 3 seconds or maybe 8 or 9 seconds textdraw is going to be dissapear idk what wrong with it here is Codes

PHP код:
////////////////INCLUDES///////////////////////////
#include <a_samp>
#include <foreach>
new Text:Textdrawdot;
new 
Text:Textdrawname;
new 
Text:TextDraw3s;
// On top of your script.
#define RepeatingTime 3
// 3 = minutes
new AutoMessageNum;
public 
OnFilterScriptInit()
{
Textdrawname TextDrawCreate(243.500000404.250000"FastAndFurious.Usa.cc");
TextDrawLetterSize(Textdrawname0.4499991.600000);
TextDrawAlignment(Textdrawname1);
TextDrawColor(Textdrawname, -1);
TextDrawSetShadow(Textdrawname0);
TextDrawSetOutline(Textdrawname1);
TextDrawBackgroundColor(Textdrawname51);
TextDrawFont(Textdrawname3);
TextDrawSetProportional(Textdrawname1);
Textdrawdot TextDrawCreate(475.500000327.833007"");
TextDrawLetterSize(Textdrawdot0.4499991.600000);
TextDrawAlignment(Textdrawdot1);
TextDrawColor(Textdrawdot, -5963521);
TextDrawSetShadow(Textdrawdot0);
TextDrawSetOutline(Textdrawdot1);
TextDrawBackgroundColor(Textdrawdot51);
TextDrawFont(Textdrawdot1);
TextDrawSetProportional(Textdrawdot1);
SetTimer("AutoMessage"RepeatingTime*45true);
return 
1;
}
forward AutoMessage();
public 
AutoMessage()
{
    switch(
AutoMessageNum)
    {
        case 
0TextDrawSetString(TextDraw3s"~r~F~W~astAndFurious.Usa.c~r~c");
        case 
1TextDrawSetString(TextDraw3s"~r~Fa~W~stAndFurious.Usa~r~.cc");
        case 
2TextDrawSetString(TextDraw3s"~r~Fas~W~tAndFurious.Us~r~a.cc");
        case 
3TextDrawSetString(TextDraw3s"~r~Fast~W~AndFurious.U~r~sa.cc");
        case 
4TextDrawSetString(TextDraw3s"~r~FastA~W~ndFurious~r~.Usa.cc");
        case 
5TextDrawSetString(TextDraw3s"~r~FastAn~W~dFuriou~r~s.Usa.cc");
        case 
6TextDrawSetString(TextDraw3s"~r~FastAnd~W~Furio~r~us.Usa.cc");
        case 
7TextDrawSetString(TextDraw3s"~r~FastAndF~W~uri~r~ous.Usa.cc");
        case 
8TextDrawSetString(TextDraw3s"~r~FastAndFu~W~r~r~ious.Usa.cc");
        case 
9TextDrawSetString(TextDraw3s"~r~FastAndFurious.Usa.cc");
        case 
10TextDrawSetString(TextDraw3s"FastAndFurious.Usa.cc");
        case 
11TextDrawSetString(TextDraw3s"~y~F~W~astAndFurious.Usa.c~y~c");
        case 
12TextDrawSetString(TextDraw3s"~y~Fa~W~stAndFurious.Usa~y~.cc");
        case 
13TextDrawSetString(TextDraw3s"~y~Fas~W~tAndFurious.Us~y~a.cc");
        case 
14TextDrawSetString(TextDraw3s"~y~Fast~W~AndFurious.U~y~sa.cc");
        case 
15TextDrawSetString(TextDraw3s"~y~FastA~W~ndFurious~y~.Usa.cc");
        case 
16TextDrawSetString(TextDraw3s"~y~FastAn~W~dFuriou~y~s.Usa.cc");
        case 
17TextDrawSetString(TextDraw3s"~y~FastAnd~W~Furio~y~us.Usa.cc");
        case 
18TextDrawSetString(TextDraw3s"~y~FastAndF~W~uri~y~ous.Usa.cc");
        case 
19TextDrawSetString(TextDraw3s"~y~FastAndFu~W~r~y~ious.Usa.cc");
        case 
20TextDrawSetString(TextDraw3s"~y~FastAndFurious.Usa.cc");
        case 
21TextDrawSetString(TextDraw3s"FastAndFurious.Usa.cc");
        case 
22TextDrawSetString(TextDraw3s"~g~F~W~astAndFurious.Usa.c~g~c");
        case 
23TextDrawSetString(TextDraw3s"~g~Fa~W~stAndFurious.Usa~g~.cc");
        case 
24TextDrawSetString(TextDraw3s"~g~Fas~W~tAndFurious.Us~g~a.cc");
        case 
25TextDrawSetString(TextDraw3s"~g~Fast~W~AndFurious.U~g~sa.cc");
        case 
26TextDrawSetString(TextDraw3s"~g~FastA~W~ndFurious~g~.Usa.cc");
        case 
27TextDrawSetString(TextDraw3s"~g~FastAn~W~dFuriou~g~s.Usa.cc");
        case 
28TextDrawSetString(TextDraw3s"~g~FastAnd~W~Furio~g~us.Usa.cc");
        case 
29TextDrawSetString(TextDraw3s"~g~FastAndF~W~uri~g~ous.Usa.cc");
        case 
30TextDrawSetString(TextDraw3s"~g~FastAndFu~W~r~g~ious.Usa.cc");
        case 
31TextDrawSetString(TextDraw3s"~g~FastAndFurious.Usa.cc");
        case 
32TextDrawSetString(TextDraw3s"FastAndFurious.Usa.cc");
        case 
33TextDrawSetString(TextDraw3s"~p~F~W~astAndFurious.Usa.c~p~c");
        case 
34TextDrawSetString(TextDraw3s"~p~Fa~W~stAndFurious.Usa~p~.cc");
        case 
35TextDrawSetString(TextDraw3s"~p~Fas~W~tAndFurious.Us~p~a.cc");
        case 
36TextDrawSetString(TextDraw3s"~p~Fast~W~AndFurious.U~p~sa.cc");
        case 
37TextDrawSetString(TextDraw3s"~p~FastA~W~ndFurious~p~.Usa.cc");
        case 
38TextDrawSetString(TextDraw3s"~p~FastAn~W~dFuriou~p~s.Usa.cc");
        case 
39TextDrawSetString(TextDraw3s"~p~FastAnd~W~Furio~p~us.Usa.cc");
        case 
40TextDrawSetString(TextDraw3s"~p~FastAndF~W~uri~p~ous.Usa.cc");
        case 
41TextDrawSetString(TextDraw3s"~p~FastAndFu~W~r~p~ious.Usa.cc");
        case 
42TextDrawSetString(TextDraw3s"~p~FastAndFurious.Usa.cc");
        case 
43TextDrawSetString(TextDraw3s"FastAndFurious.Usa.cc");
        case 
44TextDrawSetString(TextDraw3s"~b~F~W~astAndFurious.Usa.c~b~c");
        case 
45TextDrawSetString(TextDraw3s"~b~Fa~W~stAndFurious.Usa~b~.cc");
        case 
46TextDrawSetString(TextDraw3s"~b~Fas~W~tAndFurious.Us~b~a.cc");
        case 
47TextDrawSetString(TextDraw3s"~b~Fast~W~AndFurious.U~b~sa.cc");
        case 
48TextDrawSetString(TextDraw3s"~b~FastA~W~ndFurious~b~.Usa.cc");
        case 
49TextDrawSetString(TextDraw3s"~b~FastAn~W~dFuriou~b~s.Usa.cc");
        case 
50TextDrawSetString(TextDraw3s"~b~FastAnd~W~Furio~b~us.Usa.cc");
        case 
51TextDrawSetString(TextDraw3s"~b~FastAndF~W~uri~b~ous.Usa.cc");
        case 
52TextDrawSetString(TextDraw3s"~b~FastAndFu~W~r~b~ious.Usa.cc");
        case 
53TextDrawSetString(TextDraw3s"~b~FastAndFurious.Usa.cc");
        case 
54TextDrawSetString(TextDraw3s"FastAndFurious.Usa.cc");
    }
    if(
AutoMessageNum 54) { AutoMessageNum++; }
    else { 
AutoMessageNum 0; }
    return 
true;
}
public 
OnPlayerConnect(playerid)
{
TextDrawShowForPlayer(playeridTextdrawdot);
TextDrawShowForPlayer(playeridTextdrawname);
return 
1;

NOTE: if i'm using this on other server or using as filterscript its working fine otherwise its not usefull for me


Re: Textdraw bug - PepsiCola23 - 14.02.2019

do you hide the textdraw somewhere in your script?


Re: Textdraw bug - d3Pedro - 14.02.2019

Why not use random instead?
pawn Код:
new RandomMessages[][] =
{
    "~r~F~W~astAndFurious.Usa.c~r~c",
    "~r~Fa~W~stAndFurious.Usa~r~.cc",
    "~r~Fas~W~tAndFurious.Us~r~a.cc",
    "~r~Fast~W~AndFurious.U~r~sa.cc",
    "~r~FastA~W~ndFurious~r~.Usa.cc",
    "~r~FastAn~W~dFuriou~r~s.Usa.cc",
    "~r~FastAnd~W~Furio~r~us.Usa.cc",
    "~r~FastAndF~W~uri~r~ous.Usa.cc",
    "~r~FastAndFu~W~r~r~ious.Usa.cc",
    "~r~FastAndFurious.Usa.cc",
    "FastAndFurious.Usa.cc",

    "~y~F~W~astAndFurious.Usa.c~y~c",
    "~y~Fa~W~stAndFurious.Usa~y~.cc",
    "~y~Fas~W~tAndFurious.Us~y~a.cc",
    "~y~Fast~W~AndFurious.U~y~sa.cc",
    "~y~FastA~W~ndFurious~y~.Usa.cc",
    "~y~FastAn~W~dFuriou~y~s.Usa.cc",
    "~y~FastAnd~W~Furio~y~us.Usa.cc",
    "~y~FastAndF~W~uri~y~ous.Usa.cc",
    "~y~FastAndFu~W~r~y~ious.Usa.cc",
    "~y~FastAndFurious.Usa.cc",
    "FastAndFurious.Usa.cc",

    "~g~F~W~astAndFurious.Usa.c~g~c",
    "~g~Fa~W~stAndFurious.Usa~g~.cc",
    "~g~Fas~W~tAndFurious.Us~g~a.cc",
    "~g~Fast~W~AndFurious.U~g~sa.cc",
    "~g~FastA~W~ndFurious~g~.Usa.cc",
    "~g~FastAn~W~dFuriou~g~s.Usa.cc",
    "~g~FastAnd~W~Furio~g~us.Usa.cc",
    "~g~FastAndF~W~uri~g~ous.Usa.cc",
    "~g~FastAndFu~W~r~g~ious.Usa.cc",
    "~g~FastAndFurious.Usa.cc",
    "FastAndFurious.Usa.cc",

    "~p~F~W~astAndFurious.Usa.c~p~c",
    "~p~Fa~W~stAndFurious.Usa~p~.cc",
    "~p~Fas~W~tAndFurious.Us~p~a.cc",
    "~p~Fast~W~AndFurious.U~p~sa.cc",
    "~p~FastA~W~ndFurious~p~.Usa.cc",
    "~p~FastAn~W~dFuriou~p~s.Usa.cc",
    "~p~FastAnd~W~Furio~p~us.Usa.cc",
    "~p~FastAndF~W~uri~p~ous.Usa.cc",
    "~p~FastAndFu~W~r~p~ious.Usa.cc",
    "~p~FastAndFurious.Usa.cc",
    "FastAndFurious.Usa.cc",

    "~b~F~W~astAndFurious.Usa.c~b~c",
    "~b~Fa~W~stAndFurious.Usa~b~.cc",
    "~b~Fas~W~tAndFurious.Us~b~a.cc",
    "~b~Fast~W~AndFurious.U~b~sa.cc",
    "~b~FastA~W~ndFurious~b~.Usa.cc",
    "~b~FastAn~W~dFuriou~b~s.Usa.cc",
    "~b~FastAnd~W~Furio~b~us.Usa.cc",
    "~b~FastAndF~W~uri~b~ous.Usa.cc",
    "~b~FastAndFu~W~r~b~ious.Usa.cc",
    "~b~FastAndFurious.Usa.cc",
    "FastAndFurious.Usa.cc"
};
forward AutoMessage();
public AutoMessage()
{
    TextDrawSetString(Textdrawname, RandomMessages[random(sizeof(RandomMessages))]);
    return 1;
}



Re: Textdraw bug - RJTabish - 14.02.2019

but these codes are working fine on other server like grand larancy and other script


Re: Textdraw bug - d3Pedro - 14.02.2019

Quote:
Originally Posted by RJTabish
Посмотреть сообщение
but these codes are working fine on other server like grand larancy and other script
Then use crashdetect or debug them manually.


Re: Textdraw bug - RJTabish - 14.02.2019

nothing is there logs are clean


Re: Textdraw bug - RJTabish - 14.02.2019

maybe script has not enough limit of textdraws is it possible bcz i'm using 50 or something textdraws ?