Textdraws
#1

Hey guys, I'm trying to add a textdraw to the server im scripting for, this is what i've done.
I've added.
Code:
new Text:Website;
and under onplayerconnect i've added
Code:
{
 	Website = TextDrawCreate(320.00, 80.00, "Website URL: www.csroleplay.net");
    TextDrawBackgroundColor(Website, 255);
    TextDrawFont(Website, 0);
    TextDrawLetterSize(Website, 0.679999, 1.500000);
    TextDrawColor(Website, COLOR_CIVILIAN);
    TextDrawSetOutline(Website, 0);
    TextDrawSetProportional(Website, 1);
    TextDrawSetShadow(Website, 1);
    TextDrawShowForPlayer(playerid, Website)
}
Does anyone know what i've done wrong? Thanks in advance. (This broke my compiler)
Reply
#2

pawn Code:
Website = TextDrawCreate(320.00, 80.00, "Website URL: www.csroleplay.net");
    TextDrawBackgroundColor(Website, 255);
    TextDrawFont(Website, 0);
    TextDrawLetterSize(Website, 0.679999, 1.500000);
    TextDrawColor(Website, COLOR_CIVILIAN);
    TextDrawSetOutline(Website, 0);
    TextDrawSetProportional(Website, 1);
    TextDrawSetShadow(Website, 1);
     //    TextDrawShowForPlayer(playerid, Website) < Nope
Move that code to OnGameModeInit, you only create TextDraws when a player connects if it's a PlayerTextdraw.

And you're also missing a brackets on this line.

pawn Code:
TextDrawShowForPlayer(playerid, Website)
Anyway, this is the thing what should be OnPlayerConnected

pawn Code:
TextDrawShowForPlayer(playerid, Website);
Reply
#3


pawn Code:
new Text:Website;

public OnGameModeInit()
{
    Website = TextDrawCreate(320.00, 80.00, "Website URL: www.csroleplay.net");
    TextDrawBackgroundColor(Website, 255);
    TextDrawFont(Website, 0);
    TextDrawLetterSize(Website, 0.679999, 1.500000);
    TextDrawColor(Website, -1);
    TextDrawSetOutline(Website, 0);
    TextDrawSetProportional(Website, 1);
    TextDrawSetShadow(Website, 1);
    return 1;
}

public OnPlayerConnect(playerid)
{
    TextDrawShowForPlayer(playerid, Website);
    return 1;
}
PS: Want me to fix and make it better
Reply
#4

it should be in the bottom middle of the screen.
Reply
#5

well i am using your code, let me make a custom one brb with it
Reply
#6

And my compiler still breaks
Reply
#7

then it cannot be textdraw, if it freezes up just wait and ensure it compiled, sometimes the compiler freezes, but it just dont compile at all
Reply
#8

It tells me, the compiler has stopped working.
Reply
#9

http://prntscr.com/k8ady
Reply
#10



pawn Code:
new Text:Website; //ensure this somewhere at the top

public OnGameModeInit()
{
    Website = TextDrawCreate(193.600021, 427.093536, "Website URL: www.csroleplay.net");
    TextDrawLetterSize(Website, 0.449999, 1.600000);
    TextDrawAlignment(Website, 1);
    TextDrawColor(Website, -1);
    TextDrawSetShadow(Website, 0);
    TextDrawSetOutline(Website, 1);
    TextDrawBackgroundColor(Website, 51);
    TextDrawFont(Website, 0);
    TextDrawSetProportional(Website, 1);
    return 1;
}

public OnPlayerConnect(playerid)
{
    TextDrawShowForPlayer(playerid, Website);
    return 1;
}
If you pawno is compiling paste the whole code here or in pastebin and send it imma try and fix

PS: COPY and paste everything i showed you and it will work
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)