04.05.2014, 08:40
Not, this callback is called when you click on selectable textdraw i gonna make an example:
i hope this can help you
Enjoy.
pawn Code:
public OnGameModeInit()
{
TextBotton1 = TextDrawCreate(40.000000, 220.500030, "Bad Reputation");
TextDrawLetterSize(TextBotton1, 0.449999, 1.600000);
TextDrawAlignment(TextBotton1, 1);
TextDrawColor(TextBotton1, -1);
TextDrawSetShadow(TextBotton1, 0);
TextDrawSetOutline(TextBotton1, 1);
TextDrawBackgroundColor(TextBotton1, 51);
TextDrawFont(TextBotton1, 3);
TextDrawSetProportional(TextBotton1, 1);
TextDrawSetSelectable(TextBotton1, true);
}
public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
if(clickedid == TextBotton1)
{
new skill[34];
format(skill,sizeof(skill),"BReputation");
pinfo[playerid][classe] = skill;
GivePlayerWeapon(playerid,24,137);
TextDrawHideForPlayer(playerid,Textbox);
TextDrawHideForPlayer(playerid,Intestatext);
TextDrawHideForPlayer(playerid,TextBotton1);
TextDrawHideForPlayer(playerid,TextBotton2);
TextDrawHideForPlayer(playerid,TextBotton3);
TextDrawHideForPlayer(playerid,TextBotton4);
TextDrawHideForPlayer(playerid,TextBotton5);
TextDrawHideForPlayer(playerid,TextBotton6);
TextDrawHideForPlayer(playerid,TextBotton7);
TextDrawHideForPlayer(playerid,TextBotton8);
TextDrawHideForPlayer(playerid,TextBotton9);
CancelSelectTextDraw(playerid);
classescelta[playerid] = 1;
}
return 1;
}
Enjoy.