How to use OnPlayerClickTextdraw -
SWGamer - 24.09.2014
Hello I require help on when PlayerClickText draw.I made a script but it does not work.
Can you give me an example how to use it.I used it like this but it does not work.
Код:
public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
if(_:clickedid != INVALID_TEXT_DRAW)
{
if(clickedid == ZA)
{
SendClientMessage(playerid,COLOR_BLUE,"STILL Work In Progress");
return 1;
}
if(clickedid == CS)
{
SendClientMessage(playerid,COLOR_BLUE,"STILL Work In Progress");
return 1;
}
if(clickedid == DR)
{
SendClientMessage(playerid,COLOR_BLUE,"STILL Work In Progress");
return 1;
}
}
return 1;
}
Whats wrong with it.
Re: How to use OnPlayerClickTextdraw -
Manyula - 24.09.2014
I don't think the "invalid" check is necessary.
What is the "_:" supposed to mean?
Re: How to use OnPlayerClickTextdraw -
Vince - 24.09.2014
Make sure that you have used TextDrawSetSelectable in the appropriate places and that the textdraw actually has a clickable area. That means that the values in TextDrawTextSize must not be 0.
Re: How to use OnPlayerClickTextdraw -
SWGamer - 25.09.2014
Код:
CS = TextDrawCreate(40.000000, 124.000000, "Counter Strike Black Ops");
TextDrawBackgroundColor(CS, 255);
TextDrawFont(CS, 3);
TextDrawLetterSize(CS, 0.699999, 2.000000);
TextDrawColor(CS, 65535);
TextDrawSetOutline(CS, 0);
TextDrawSetProportional(CS, 1);
TextDrawSetShadow(CS, 1);
TextDrawUseBox(CS, 1);
TextDrawBoxColor(CS, 16711935);
TextDrawTextSize(CS, 360.000000, 40.000000);
TextDrawSetSelectable(CS, 1);
ZA = TextDrawCreate(40.000000, 194.000000, "Zombie Apocalypse");
TextDrawBackgroundColor(ZA, 255);
TextDrawFont(ZA, 3);
TextDrawLetterSize(ZA, 0.699999, 2.000000);
TextDrawColor(ZA, -65281);
TextDrawSetOutline(ZA, 0);
TextDrawSetProportional(ZA, 1);
TextDrawSetShadow(ZA, 1);
TextDrawUseBox(ZA, 1);
TextDrawBoxColor(ZA, -16776961);
TextDrawTextSize(ZA, 360.000000, 40.000000);
TextDrawSetSelectable(ZA, 1);
DR = TextDrawCreate(40.000000, 254.000000, "Death Race");
TextDrawBackgroundColor(DR, 255);
TextDrawFont(DR, 3);
TextDrawLetterSize(DR, 0.699999, 2.000000);
TextDrawColor(DR, -1);
TextDrawSetOutline(DR, 0);
TextDrawSetProportional(DR, 1);
TextDrawSetShadow(DR, 1);
TextDrawUseBox(DR, 1);
TextDrawBoxColor(DR, 255);
TextDrawTextSize(DR, 360.000000, 40.000000);
TextDrawSetSelectable(DR, 1);
Its already there bro.
Re: How to use OnPlayerClickTextdraw -
Crayder - 23.10.2014
The valid td check is un-needed, How would the callback be called when a player clicks a td that doesn't exist? Try removing it, I don't see any other problem, but I am on my phone so bare with me... :3