Textdraw crashing the player
#1

Timer:

pawn Код:
forward TutTimer(playerid);
public TutTimer(playerid)
{
    new string[800];
    Player[playerid][pTut] = 1;
    SetPlayerCameraLookAt(playerid, 1553.1650,-1675.6091,16.1953);
    SetPlayerCameraPos(playerid, 1530.1918,-1665.5634,21.3828);
    SetPlayerPos(playerid, 1553.1650,-1675.6091, 16.1953 - 2);
    TextDrawShowForPlayer(playerid, Textdraw0[playerid]);
    TextDrawShowForPlayer(playerid, Textdraw1[playerid]);
    TextDrawSetString(Textdraw1[playerid], "~w~Welcome to ~y~Everous Roleplay~w~. We hope we can cover what you need in this tutorial.~n~There are various jobs such as Trucker, Weapon Dealer etc. A full list of jobs can be found by typing ~g~/jobhelp~w~.~n~As a newbie it's recommended to work as a Trucker or a Street Sweeper, since it provides a fairly enough amount of cash.~n~The cash you earn goes to your bank.");
    SetTimerEx("TutTimer2", 20000, false, "i", playerid);
    return 1;
}
Every time the textdraw attempts to show up the player crashes. Any reply is appriciated.
Reply
#2

TutTimer 1 or 2? Which doesnt show?
Reply
#3

Ignore the line
pawn Код:
SetTimerEx("TutTimer2", 20000, false, "i", playerid);
The problem is above, every time the TD attempts to show up it crashes the player.
Reply
#4

Okay, comment out 'TextDrawSetString' and run it again...

Or check your CreateTextdraw I have a feeling you have set it to "", which it must be " " or "_" at the least.
Reply
#5

It was set as a "New Textdraw" and changed it to ""
Reply
#6

Maybe this line is too long..

pawn Код:
TextDrawSetString(Textdraw1[playerid], "~w~Welcome to ~y~Everous Roleplay~w~. We hope we can cover what you need in this tutorial.~n~There are various jobs such as Trucker, Weapon Dealer etc. A full list of jobs can be found by typing ~g~/jobhelp~w~.~n~As a newbie it's recommended to work as a Trucker or a Street Sweeper, since it provides a fairly enough amount of cash.~n~The cash you earn goes to your bank.");
Use strcat then.
Reply
#7

You can't have any ~ codes after the 255th character of the textdraw, as this will crash your client. It's even stated on the wiki! (here)

Quote:

If you use color codes (such as ~R~ ~G~) beyond 255th character the client will crash trying to display the textdraw.

Reply
#8

Thank you for your replies!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)