Help | Can I add a textdraw on a specific teleport?
#1

Hello guys. I am wondering if it is possible to make it ^.
I've made a teleport called - /Training in my server.
DeathMatch server btw. I have some textdraws when playerconnect:

Quote:

cvctd4 = TextDrawCreate(10.0, 434.5, "Achieve DeathMatch Community [V0.2]");
TextDrawLetterSize(cvctd4, 0.400000, 1.600000);
TextDrawUseBox(cvctd4, true);
TextDrawFont(cvctd4,1);
TextDrawColor(cvctd4,0x46BBAA00);
TextDrawBoxColor(cvctd4, 3);
TextDrawBackgroundColor(cvctd4, 126);
TextDrawUseBox(cvctd4, true);

Now, when player's enter "/Training". i want cvctd4 textdraw to get disabled "Hide".
can I just do: HideTextDrawForPlayer? when hes on Training Teleport? And to make a new one if he's on Training Teleport? should i do:


Quote:

if(!strcmp(cmdtext, "/Training", true))
{
TextDrawHideForPlayer(playerid,cvctd4[playerid]);
TextDrawShowForPlayer(playerid,Training[playerid]);
}

Quote:

if(!strcmp(cmdtext, "/LeaveTraining", true))
{
TextDrawShowForPlayer(playerid,cvctd4[playerid]);
TextDrawHideForPlayer(playerid,Training[playerid]);
}

Might work?
Reply
#2

Your codes will give compile errors, first goto your td editor again and make your cvctd4 td as player textdraw(currently your td is a public one which means changes of it(show,hide) will affect for everyone not only for the relevent player [there will be a button called PUBLIC to PER PALYER in your td editor simply click that and export]) also make your training td as a player td

Now follow this
Код:
//put this at the top of the script
new PlayerText:cvctd47MAX_PLAYERS];

//now put the gain codes by exporting under on player connect(td creates)

//Then put your code under onplayer command text
f(!strcmp(cmdtext, "/Training", true))
{
PlayerTextDrawHide(playerid,cvctd4[playerid]);
PlayerTextDrawShow(playerid,Training[playerid]);
}
if(!strcmp(cmdtext, "/LeaveTraining", true))
{
PlayerTextDrawShow(playerid,cvctd4[playerid]);
PlayerTextDrawHide(playerid,Training[playerid]);
}

//Now it will work
do the same procedure for the Training[payerid] td
+ REP me if it was helpful
Reply
#3

Quote:
Originally Posted by GameOvr
Посмотреть сообщение
Your codes will give compile errors, first goto your td editor again and make your cvctd4 td as player textdraw(currently your td is a public one which means changes of it(show,hide) will affect for everyone not only for the relevent player [there will be a button called PUBLIC to PER PALYER in your td editor simply click that and export]) also make your training td as a player td

Now follow this
Код:
//put this at the top of the script
new PlayerText:cvctd47MAX_PLAYERS];

//now put the gain codes by exporting under on player connect(td creates)

//Then put your code under onplayer command text
f(!strcmp(cmdtext, "/Training", true))
{
TextDrawHideForPlayer(playerid,cvctd4[playerid]);
TextDrawShowForPlayer(playerid,Training[playerid]);
}
if(!strcmp(cmdtext, "/LeaveTraining", true))
{
TextDrawShowForPlayer(playerid,cvctd4[playerid]);
TextDrawHideForPlayer(playerid,Training[playerid]);
}

//Now it will work
do the same procedure for the Training[payerid] td
+ REP me if it was helpful
Yep ! Thanks alot
Reply
#4

Quote:
Originally Posted by GameOvr
Посмотреть сообщение
Your codes will give compile errors, first goto your td editor again and make your cvctd4 td as player textdraw(currently your td is a public one which means changes of it(show,hide) will affect for everyone not only for the relevent player [there will be a button called PUBLIC to PER PALYER in your td editor simply click that and export]) also make your training td as a player td

Now follow this
Код:
//put this at the top of the script
new PlayerText:cvctd47MAX_PLAYERS];

//now put the gain codes by exporting under on player connect(td creates)

//Then put your code under onplayer command text
f(!strcmp(cmdtext, "/Training", true))
{
TextDrawHideForPlayer(playerid,cvctd4[playerid]);
TextDrawShowForPlayer(playerid,Training[playerid]);
}
if(!strcmp(cmdtext, "/LeaveTraining", true))
{
TextDrawShowForPlayer(playerid,cvctd4[playerid]);
TextDrawHideForPlayer(playerid,Training[playerid]);
}

//Now it will work
do the same procedure for the Training[payerid] td
+ REP me if it was helpful
"TextDrawShowForPlayer" and "TextDrawHideForPlayer" for a "Player Text"?
Reply
#5

Quote:
Originally Posted by SaMuRy
Посмотреть сообщение
Yep ! Thanks alot
But, a lot of warnings... I did new PlayerText:cvctd4[MAX_PLAYERS]; Instead of Text:cvctd4[MAX_PLAYERS];, And now I can see over 9 warnings.
Reply
#6

Quote:
Originally Posted by Undef1ned
Посмотреть сообщение
"TextDrawShowForPlayer" and "TextDrawHideForPlayer" for a "Player Text"?
I Shouldn't do it right? it means to player, TextDrawShowFor*Player*...
Reply
#7

For Text:

PHP код:
TextDrawShowForPlayer
TextDrawHideForPlayer 
For PlayerText:

PHP код:
PlayerTextDrawShow
PlayerTextDrawHide 
Reply
#8

Quote:
Originally Posted by Undef1ned
Посмотреть сообщение
For Text:

PHP код:
TextDrawShowForPlayer
TextDrawHideForPlayer 
For PlayerText:

PHP код:
PlayerTextDrawShow
PlayerTextDrawHide 
Oh ye my fault forgot that , use the PlayerText code

Again read this EDITED the post
Quote:

Your codes will give compile errors, first goto your td editor again and make your cvctd4 td as player textdraw(currently your td is a public one which means changes of it(show,hide) will affect for everyone not only for the relevent player [there will be a button called PUBLIC to PER PALYER in your td editor simply click that and export]) also make your training td as a player td

Now follow this
Код:
//put this at the top of the script
new PlayerText:cvctd47MAX_PLAYERS];

//now put the gain codes by exporting under on player connect(td creates)

//Then put your code under onplayer command text
f(!strcmp(cmdtext, "/Training", true))
{
PlayerTextDrawHide(playerid,cvctd4[playerid]);
PlayerTextDrawShow(playerid,Training[playerid]);
}
if(!strcmp(cmdtext, "/LeaveTraining", true))
{
PlayerTextDrawShow(playerid,cvctd4[playerid]);
PlayerTextDrawHide(playerid,Training[playerid]);
}

//Now it will work
do the same procedure for the Training[payerid] td
+ REP me if it was helpful

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)