SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 14/02/2019, 07:02 AM   #1
RJTabish
Little Clucker
 
Join Date: Jul 2018
Location: UknownDarkIsland
Posts: 38
Reputation: 0
Wink Textdraw bug

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 Code:
////////////////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
RJTabish is offline   Reply With Quote
Old 14/02/2019, 12:15 PM   #2
PepsiCola23
Gangsta
 
Join Date: May 2015
Posts: 726
Reputation: 3
Default Re: Textdraw bug

do you hide the textdraw somewhere in your script?
PepsiCola23 is offline   Reply With Quote
Old 14/02/2019, 12:18 PM   #3
Y_Less
Beta Tester
 
Y_Less's Avatar
 
Join Date: Jun 2008
Location: 629 - git.io/Y
Posts: 15,698
Reputation: 3226
Default Re: Textdraw bug

1) There are 60 seconds in a minute, not 45.

2) You neither create nor show `TextDraw3s` in that code.
Y_Less is online now   Reply With Quote
Old 14/02/2019, 12:54 PM   #4
ConnorW
Huge Clucker
 
ConnorW's Avatar
 
Join Date: Apr 2012
Location: Los Santos
Posts: 210
Reputation: 66
Default Re: Textdraw bug

Why not use random instead?
pawn Code:
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;
}
__________________



ConnorW is offline   Reply With Quote
Old 14/02/2019, 04:07 PM   #5
RJTabish
Little Clucker
 
Join Date: Jul 2018
Location: UknownDarkIsland
Posts: 38
Reputation: 0
Default Re: Textdraw bug

but these codes are working fine on other server like grand larancy and other script
RJTabish is offline   Reply With Quote
Old 14/02/2019, 04:11 PM   #6
ConnorW
Huge Clucker
 
ConnorW's Avatar
 
Join Date: Apr 2012
Location: Los Santos
Posts: 210
Reputation: 66
Default Re: Textdraw bug

Quote:
Originally Posted by RJTabish View Post
but these codes are working fine on other server like grand larancy and other script
Then use crashdetect or debug them manually.
__________________



ConnorW is offline   Reply With Quote
Old 14/02/2019, 05:03 PM   #7
RJTabish
Little Clucker
 
Join Date: Jul 2018
Location: UknownDarkIsland
Posts: 38
Reputation: 0
Default Re: Textdraw bug

nothing is there logs are clean
RJTabish is offline   Reply With Quote
Old 14/02/2019, 05:07 PM   #8
Y_Less
Beta Tester
 
Y_Less's Avatar
 
Join Date: Jun 2008
Location: 629 - git.io/Y
Posts: 15,698
Reputation: 3226
Default Re: Textdraw bug

Then the problem is somewhere else. You've clearly not shown all the code, and showing the parts you know works is totally useless.
Y_Less is online now   Reply With Quote
Old 14/02/2019, 05:17 PM   #9
RJTabish
Little Clucker
 
Join Date: Jul 2018
Location: UknownDarkIsland
Posts: 38
Reputation: 0
Default Re: Textdraw bug

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

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Tutorial] Making a Health/armour textdraw! (Global textdraw) -Rebel Son- Tutorials 21 23/10/2017 10:00 AM
Created a textdraw from Zamaroht's Textdraw Editor JeevanJyothish Scripting Help 1 26/08/2014 07:10 AM
Moving a textdraw on the y-axis doesn't work. (TextDraw Editor) AndySedeyn Scripting Help 1 14/06/2014 03:50 PM
[FilterScript] [FS] TextDraw editor 0.6 - Multiple textdraw support, for proffesional textdraws Zamaroht Filterscripts 369 20/01/2013 03:46 PM
[Tutorial] --: Creating Textdraw's In The Easiest Way :-- [Helpful for textdraw creators] Nirzor Tutorials 15 04/10/2012 01:32 PM


All times are GMT. The time now is 01:58 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.