Need Help
#1

PHP код:
hey i need help .. i dont know what to call that lolz... i want make 3 or more .. but cant .. can some help me ?
This you will know what i mean :
new 
Text:txtTimeDisp;
new 
timestr[32];
             
public 
OnGameModeInit()
{         
TextDrawSetString(txtTimeDisp,timestr);
txtTimeDisp TextDrawCreate(600.0,25.0,"SRC");
TextDrawUseBox(txtTimeDisp0);
TextDrawFont(txtTimeDisp2);
TextDrawSetShadow(txtTimeDisp,1); 
TextDrawSetOutline(txtTimeDisp,1); 
TextDrawBackgroundColor(txtTimeDisp,gray);
TextDrawColor(txtTimeDisp,black);
TextDrawAlignment(txtTimeDisp,3);
TextDrawLetterSize(txtTimeDisp,0.9,1.5);
txtTimeDisp TextDrawCreate(634.000000435.000000,"www.src-community.com");
TextDrawUseBox(txtTimeDisp0);
TextDrawFont(txtTimeDisp2);
TextDrawSetShadow(txtTimeDisp,1); 
TextDrawSetOutline(txtTimeDisp,1); 
TextDrawBackgroundColor(txtTimeDisp,gray);
TextDrawColor(txtTimeDisp,black);
TextDrawAlignment(txtTimeDisp,3);
TextDrawLetterSize(txtTimeDisp,0.5000001.000000);
return 
1;
}
public 
OnPlayerDeath(playeridkilleridreason)
{
TextDrawHideForPlayer(playerid,txtTimeDisp);
return 
1;

Reply
#2

pawn Код:
new Text:txtTimeDisp;
new Text:txtTimeDisp2;
new timestr[32];
             
public OnGameModeInit()
{        
TextDrawSetString(txtTimeDisp,timestr);
txtTimeDisp = TextDrawCreate(600.0,25.0,"SRC");
TextDrawUseBox(txtTimeDisp, 0);
TextDrawFont(txtTimeDisp, 2);
TextDrawSetShadow(txtTimeDisp,1);
TextDrawSetOutline(txtTimeDisp,1);
TextDrawBackgroundColor(txtTimeDisp,gray);
TextDrawColor(txtTimeDisp,black);
TextDrawAlignment(txtTimeDisp,3);
TextDrawLetterSize(txtTimeDisp,0.9,1.5);
txtTimeDisp2 = TextDrawCreate(634.000000, 435.000000,"www.src-community.com");
TextDrawUseBox(txtTimeDisp2,0);
TextDrawFont(txtTimeDisp, 2);
TextDrawSetShadow(txtTimeDisp2,1);
TextDrawSetOutline(txtTimeDisp2,1);
TextDrawBackgroundColor(txtTimeDisp2,gray);
TextDrawColor(txtTimeDisp2,black);
TextDrawAlignment(txtTimeDisp2,3);
TextDrawLetterSize(txtTimeDisp2,0.500000, 1.000000);
return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
TextDrawHideForPlayer(playerid,txtTimeDisp);
TextDrawHideForPlayer(playerid,txtTimeDisp2);
return 1;
}
NOTE: Your textdraws will disappear forever once the player dies.
Reply
#3

Quote:
Originally Posted by clarencecuzz
Посмотреть сообщение
pawn Код:
new Text:txtTimeDisp;
new Text:txtTimeDisp2;
new timestr[32];
             
public OnGameModeInit()
{        
TextDrawSetString(txtTimeDisp,timestr);
txtTimeDisp = TextDrawCreate(600.0,25.0,"SRC");
TextDrawUseBox(txtTimeDisp, 0);
TextDrawFont(txtTimeDisp, 2);
TextDrawSetShadow(txtTimeDisp,1);
TextDrawSetOutline(txtTimeDisp,1);
TextDrawBackgroundColor(txtTimeDisp,gray);
TextDrawColor(txtTimeDisp,black);
TextDrawAlignment(txtTimeDisp,3);
TextDrawLetterSize(txtTimeDisp,0.9,1.5);
txtTimeDisp2 = TextDrawCreate(634.000000, 435.000000,"www.src-community.com");
TextDrawUseBox(txtTimeDisp2,0);
TextDrawFont(txtTimeDisp, 2);
TextDrawSetShadow(txtTimeDisp2,1);
TextDrawSetOutline(txtTimeDisp2,1);
TextDrawBackgroundColor(txtTimeDisp2,gray);
TextDrawColor(txtTimeDisp2,black);
TextDrawAlignment(txtTimeDisp2,3);
TextDrawLetterSize(txtTimeDisp2,0.500000, 1.000000);
return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
TextDrawHideForPlayer(playerid,txtTimeDisp);
TextDrawHideForPlayer(playerid,txtTimeDisp2);
return 1;
}
NOTE: Your textdraws will disappear forever once the player dies.
lolz .. that's not will happen .. i dont mean the OnPlayerDeath .. what i mean the textdraw .. not showing SRC .. the textdraw will show "www.src-community.com" only you know .. if you dont know what i mean .. put this to your GM
Reply
#4

please help me lolz ..
Reply
#5

Have you tested my code?
Reply
#6

lolz .. sorry .. i didnt see txtTimeDisp2 .. haha .. sorry .. repp++ for you man .. but its not show textdraw ..
Reply
#7

I think it might be in this area:
pawn Код:
TextDrawSetString(txtTimeDisp,timestr);
txtTimeDisp = TextDrawCreate(600.0,25.0,"SRC");
Notice how TextDrawSetString is happening before you have even created the textdraw?
Try replacing it with this:
pawn Код:
txtTimeDisp = TextDrawCreate(600.0,25.0,"SRC");
TextDrawSetString(txtTimeDisp,timestr);
EDIT: Sorry noticed a few errors in the last script I posted. The full code should look something like this:
pawn Код:
new Text:txtTimeDisp;
new Text:txtTimeDisp2;
new timestr[32];
             
public OnGameModeInit()
{        
txtTimeDisp = TextDrawCreate(600.0,25.0,"SRC");
TextDrawUseBox(txtTimeDisp, 0);
TextDrawFont(txtTimeDisp, 2);
TextDrawSetShadow(txtTimeDisp,1);
TextDrawSetOutline(txtTimeDisp,1);
TextDrawBackgroundColor(txtTimeDisp,gray);
TextDrawColor(txtTimeDisp,black);
TextDrawAlignment(txtTimeDisp,3);
TextDrawSetString(txtTimeDisp,timestr);
TextDrawLetterSize(txtTimeDisp,0.9,1.5);
txtTimeDisp2 = TextDrawCreate(634.000000, 435.000000,"www.src-community.com");
TextDrawUseBox(txtTimeDisp2,0);
TextDrawFont(txtTimeDisp2, 2);
TextDrawSetShadow(txtTimeDisp2,1);
TextDrawSetOutline(txtTimeDisp2,1);
TextDrawBackgroundColor(txtTimeDisp2,gray);
TextDrawColor(txtTimeDisp2,black);
TextDrawAlignment(txtTimeDisp2,3);
TextDrawLetterSize(txtTimeDisp2,0.500000, 1.000000);
return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
TextDrawHideForPlayer(playerid,txtTimeDisp);
TextDrawHideForPlayer(playerid,txtTimeDisp2);
return 1;
}
Reply
#8

not working too ...
Reply
#9

I don't have a lot of experience with textdraws so I probably won't be able to help you as much as some other users might be able to. Sorry :S
Reply
#10

Quote:
Originally Posted by clarencecuzz
Посмотреть сообщение
pawn Код:
new Text:txtTimeDisp;
new Text:txtTimeDisp2;
new timestr[32];
             
public OnGameModeInit()
{        
TextDrawSetString(txtTimeDisp,timestr);
txtTimeDisp = TextDrawCreate(600.0,25.0,"SRC");
TextDrawUseBox(txtTimeDisp, 0);
TextDrawFont(txtTimeDisp, 2);
TextDrawSetShadow(txtTimeDisp,1);
TextDrawSetOutline(txtTimeDisp,1);
TextDrawBackgroundColor(txtTimeDisp,gray);
TextDrawColor(txtTimeDisp,black);
TextDrawAlignment(txtTimeDisp,3);
TextDrawLetterSize(txtTimeDisp,0.9,1.5);
txtTimeDisp2 = TextDrawCreate(634.000000, 435.000000,"www.src-community.com");
TextDrawUseBox(txtTimeDisp2,0);
TextDrawFont(txtTimeDisp, 2);
TextDrawSetShadow(txtTimeDisp2,1);
TextDrawSetOutline(txtTimeDisp2,1);
TextDrawBackgroundColor(txtTimeDisp2,gray);
TextDrawColor(txtTimeDisp2,black);
TextDrawAlignment(txtTimeDisp2,3);
TextDrawLetterSize(txtTimeDisp2,0.500000, 1.000000);
return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
TextDrawHideForPlayer(playerid,txtTimeDisp);
TextDrawHideForPlayer(playerid,txtTimeDisp2);
return 1;
}
NOTE: Your textdraws will disappear forever once the player dies.
In the first place, how will the textdraws appear when there is nothing used to show them?
OT: Use
pawn Код:
TextDrawShowForPlayer(playerid,txtTimeDisp);
TextDrawShowForPlayer(playerid,txtTimeDisp2);
EDIT: late...
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)