How to fix this TextDraw?!
#1

Hello guys i am working on my server and i am trying to do when player connect to see good design so help me if you can here is the script.
PHP код:
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT
#include <a_samp>
#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
    print(
"\n--------------------------------------");
    print(
" Blank Filterscript by your name here");
    print(
"--------------------------------------\n");
    return 
1;
}
public 
OnFilterScriptExit()
{
    return 
1;
}
#else
main()
{
    print(
"\n----------------------------------");
    print(
" Blank Gamemode by your name here");
    print(
"----------------------------------\n");
}
#endif
public OnGameModeInit()
{
    new 
Text:MyTD;
    new 
Text:MyRD;
    new 
Text:Welcome;
    new 
Text:text1;
    new 
Text:text2;
    new 
Text:text3;
    
//Welcome TextDraws
    
MyTD TextDrawCreate(1.0001.00,"~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~");
    
TextDrawUseBox(MyTD 1);
    
TextDrawFont(MyTD 1);
    
TextDrawLetterSize(MyTD ,0.3,1);
    
TextDrawSetShadow(MyTD ,1);
    
TextDrawSetOutline(MyTD ,1);
    
TextDrawBackgroundColor(MyTD ,0x000000FF);
    
TextDrawBoxColor(MyTD ,0x000000cc);
    
TextDrawColor(MyTD ,0x000000FF);
    
TextDrawTextSize(MyTD 720.0200.0);
    
TextDrawSetProportional(MyTD1);
    
TextDrawAlignment(MyTD0);
    
//Other Text Draw
    
MyRD TextDrawCreate(1.000300.00,"~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~");
    
TextDrawUseBox(MyRD 1);
    
TextDrawFont(MyRD 1);
    
TextDrawLetterSize(MyRD ,0.3,1);
    
TextDrawSetShadow(MyRD ,1);
    
TextDrawSetOutline(MyRD ,1);
    
TextDrawBackgroundColor(MyRD ,0x000000FF);
    
TextDrawBoxColor(MyRD ,0x000000cc);
    
TextDrawColor(MyRD ,0x000000FF);
    
TextDrawTextSize(MyRD 720.0200.0);
    
TextDrawSetProportional(MyRD1);
    
TextDrawAlignment(MyRD0);
    
//Text Draw for Ad.
    
Welcome TextDrawCreate(277.000000305.000000"Welcome");
    
text1 TextDrawCreate(300.000000320.000000"to");
    
text2 TextDrawCreate(240.000000335.000000"Life For Speed V1.3");
    
TextDrawAlignment(Welcome0);
    
TextDrawAlignment(text10);
    
TextDrawAlignment(text20);
    
TextDrawBackgroundColor(Welcome0x00ff0066);
    
TextDrawBackgroundColor(text10xF6F600AA);
    
TextDrawBackgroundColor(text20xF6F600AA);
    
TextDrawFont(Welcome0);
    
TextDrawLetterSize(Welcome0.5999991.600000);
    
TextDrawFont(text10);
    
TextDrawLetterSize(text10.5999991.600000);
    
TextDrawFont(text20);
    
TextDrawLetterSize(text20.5999991.600000);
    
TextDrawColor(Welcome0xff0000ff);
    
TextDrawColor(text10x0000AFAA);
    
TextDrawColor(text20xF67F00AA);
    
TextDrawSetOutline(Welcome1);
    
TextDrawSetOutline(text11);
    
TextDrawSetOutline(text21);
    
TextDrawSetProportional(Welcome1);
    
TextDrawSetProportional(text11);
    
TextDrawSetProportional(text21);
    
TextDrawSetShadow(Welcome1);
    
TextDrawSetShadow(text11);
    
TextDrawSetShadow(text21);
    
//
    
text3 TextDrawCreate(90.00000050.000000"         L F S");
    
TextDrawAlignment(text30);
    
TextDrawBackgroundColor(text30x33CCFFAA);
    
TextDrawLetterSize(text32.5999991.800000);
    
TextDrawFont(text30);
    
TextDrawColor(text30x00ff0066);
    
TextDrawSetOutline(text31);
    
TextDrawSetProportional(text31);
    
TextDrawSetShadow(text31);
    return 
1;
}
public 
OnPlayerConnect(playerid)
{
    
SetTimer("settime",1000,true);
    
//
    
TextDrawShowForPlayer(playerid,MyTD);
    
TextDrawShowForPlayer(playerid,MyRD);
    
TextDrawShowForPlayer(playeridWelcome);
    
TextDrawShowForPlayer(playeridtext1);
    
TextDrawShowForPlayer(playeridtext2);
    
TextDrawShowForPlayer(playeridtext3);
    return 
1;
}
public 
OnPlayerSpawn(playerid)
{
        new 
rand random);
    
SetPlayerInterior(playerid,0);
    
TogglePlayerClock(playerid,1);
    
TextDrawHideForPlayer(playeridMyTD);
    
TextDrawHideForPlayer(playeridMyRD);
    
TextDrawHideForPlayer(playeridWelcome);
    
TextDrawHideForPlayer(playeridtext1);
    
TextDrawHideForPlayer(playeridtext2);
    
TextDrawHideForPlayer(playeridtext3);
    return 
1;
}
    return 
1;

So .. look now errors..
Quote:

: error 017: undefined symbol "MyTD"
error 017: undefined symbol "MyRD"
error 017: undefined symbol "Welcome"
error 017: undefined symbol "text1"
error 017: undefined symbol "text2"
error 017: undefined symbol "text3"
warning 217: loose indentation
error 017: undefined symbol "MyTD"
error 017: undefined symbol "MyRD"
error 017: undefined symbol "Welcome"
error 017: undefined symbol "text1"
error 017: undefined symbol "text2"
error 017: undefined symbol "text3"
warning 204: symbol is assigned a value that is never used: "rand"
(130 -- 141) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


13 Errors.

help me if you can guys. i will write you in /credits
this script is in my gamemode but now i make it fs cuz i dont want to post ma gm here ..
and when i put it in gm too here is again this errors
thanks!
Reply
#2

Filterscript isn't defined... And if you want it to be a filterscript, the code has to go under OnFilterScriptInit ()

Other than that, have you tried defining the variables at the top of the script?
Reply
#3

hmm no im not tryed it now imma gonna try :P , i have only this on top of the script
Quote:

new Text:MyTD;
new Text:MyRD;
new Text:Welcome;
new Text:text1;
new Text:text2;
new Text:text3;

Reply
#4

pawn Код:
#include <a_samp>

    new Text:MyTD;
    new Text:MyRD;
    new Text:Welcome;
    new Text:text1;
    new Text:text2;
    new Text:text3;

main()
{
    print("\n----------------------------------");
    print(" Blank Gamemode by your name here");
    print("----------------------------------\n");
}

#endif

public OnGameModeInit()
{
    //Welcome TextDraws
    MyTD = TextDrawCreate(1.000, 1.00,"~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~");
    TextDrawUseBox(MyTD , 1);
    TextDrawFont(MyTD , 1);
    TextDrawLetterSize(MyTD ,0.3,1);
    TextDrawSetShadow(MyTD ,1);
    TextDrawSetOutline(MyTD ,1);
    TextDrawBackgroundColor(MyTD ,0x000000FF);
    TextDrawBoxColor(MyTD ,0x000000cc);
    TextDrawColor(MyTD ,0x000000FF);
    TextDrawTextSize(MyTD , 720.0, 200.0);
    TextDrawSetProportional(MyTD, 1);
    TextDrawAlignment(MyTD, 0);

    //Other Text Draw
    MyRD = TextDrawCreate(1.000, 300.00,"~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~");
    TextDrawUseBox(MyRD , 1);
    TextDrawFont(MyRD , 1);
    TextDrawLetterSize(MyRD ,0.3,1);
    TextDrawSetShadow(MyRD ,1);
    TextDrawSetOutline(MyRD ,1);
    TextDrawBackgroundColor(MyRD ,0x000000FF);
    TextDrawBoxColor(MyRD ,0x000000cc);
    TextDrawColor(MyRD ,0x000000FF);
    TextDrawTextSize(MyRD , 720.0, 200.0);
    TextDrawSetProportional(MyRD, 1);
    TextDrawAlignment(MyRD, 0);

    //Text Draw for Ad.
    Welcome = TextDrawCreate(277.000000, 305.000000, "Welcome");
    text1 = TextDrawCreate(300.000000, 320.000000, "to");
    text2 = TextDrawCreate(240.000000, 335.000000, "Life For Speed V1.3");
    TextDrawAlignment(Welcome, 0);
    TextDrawAlignment(text1, 0);
    TextDrawAlignment(text2, 0);
    TextDrawBackgroundColor(Welcome, 0x00ff0066);
    TextDrawBackgroundColor(text1, 0xF6F600AA);
    TextDrawBackgroundColor(text2, 0xF6F600AA);
    TextDrawFont(Welcome, 0);
    TextDrawLetterSize(Welcome, 0.599999, 1.600000);
    TextDrawFont(text1, 0);
    TextDrawLetterSize(text1, 0.599999, 1.600000);
    TextDrawFont(text2, 0);
    TextDrawLetterSize(text2, 0.599999, 1.600000);
    TextDrawColor(Welcome, 0xff0000ff);
    TextDrawColor(text1, 0x0000AFAA);
    TextDrawColor(text2, 0xF67F00AA);
    TextDrawSetOutline(Welcome, 1);
    TextDrawSetOutline(text1, 1);
    TextDrawSetOutline(text2, 1);
    TextDrawSetProportional(Welcome, 1);
    TextDrawSetProportional(text1, 1);
    TextDrawSetProportional(text2, 1);
    TextDrawSetShadow(Welcome, 1);
    TextDrawSetShadow(text1, 1);
    TextDrawSetShadow(text2, 1);

    //
    text3 = TextDrawCreate(90.000000, 50.000000, "         L F S");
    TextDrawAlignment(text3, 0);
    TextDrawBackgroundColor(text3, 0x33CCFFAA);
    TextDrawLetterSize(text3, 2.599999, 1.800000);
    TextDrawFont(text3, 0);
    TextDrawColor(text3, 0x00ff0066);
    TextDrawSetOutline(text3, 1);
    TextDrawSetProportional(text3, 1);
    TextDrawSetShadow(text3, 1);

    return 1;
}


public OnPlayerConnect(playerid)
{
    SetTimer("settime",1000,true);
    //

    TextDrawShowForPlayer(playerid,MyTD);
    TextDrawShowForPlayer(playerid,MyRD);
    TextDrawShowForPlayer(playerid, Welcome);
    TextDrawShowForPlayer(playerid, text1);
    TextDrawShowForPlayer(playerid, text2);
    TextDrawShowForPlayer(playerid, text3);
    return 1;
}


public OnPlayerSpawn(playerid)
{
        new rand = random( 5 );
    SetPlayerInterior(playerid,0);
    TogglePlayerClock(playerid,1);
    TextDrawHideForPlayer(playerid, MyTD);
    TextDrawHideForPlayer(playerid, MyRD);
    TextDrawHideForPlayer(playerid, Welcome);
    TextDrawHideForPlayer(playerid, text1);
    TextDrawHideForPlayer(playerid, text2);
    TextDrawHideForPlayer(playerid, text3);
    return 1;
}
    return 1;
}
Eited try that I made it a gamemode I think thats what you wanted - UNTESTED
Reply
#5

Thank you so much , works perfect! +1 star of me!!
Thank you bro!!
when i edit some more u can come here
www.highvoltage-drift.tk and type /credits and see here !
tell me ur sa-mp nick :P
Reply
#6

Theres really no need to give me credit. However I will goto your server in about 10 mins to check it out
Reply
#7

hello i saw you in server now i updated this script . thanks again !
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)