Hallöle.
Ich habe anklickbare Textdraws erstellt (5 Stück um genau zusein).
Es klappt auch super, die Aktion wird ausgeführt wenn ich sie anklicke. Zumindest beim ersten. Die "Hitbox" dieses Textdraws ist so groß das ich egal wo ich darunter bin, dieses Textdraw auswähle...
Hier mal die Codes:
public OnGameModeInit()
{
// Login
Textdraw0 = TextDrawCreate(98.000000, 152.077774, "usebox");
TextDrawLetterSize(Textdraw0, 0.000000, 1.066048);
TextDrawTextSize(Textdraw0, 23.500000, 0.000000);
TextDrawAlignment(Textdraw0, 1);
TextDrawColor(Textdraw0, 0);
TextDrawUseBox(Textdraw0, true);
TextDrawBoxColor(Textdraw0, 102);
TextDrawSetShadow(Textdraw0, 0);
TextDrawSetOutline(Textdraw0, 0);
TextDrawFont(Textdraw0, 0);
Textdraw1 = TextDrawCreate(106.500000, 173.855560, "usebox");
TextDrawLetterSize(Textdraw1, 0.000000, 0.996913);
TextDrawTextSize(Textdraw1, 24.000000, 0.000000);
TextDrawAlignment(Textdraw1, 1);
TextDrawColor(Textdraw1, 0);
TextDrawUseBox(Textdraw1, true);
TextDrawBoxColor(Textdraw1, 102);
TextDrawSetShadow(Textdraw1, 0);
TextDrawSetOutline(Textdraw1, 0);
TextDrawFont(Textdraw1, 0);
Textdraw2 = TextDrawCreate(115.000000, 191.900009, "usebox");
TextDrawLetterSize(Textdraw2, 0.000000, 0.996913);
TextDrawTextSize(Textdraw2, 23.500000, 0.000000);
TextDrawAlignment(Textdraw2, 1);
TextDrawColor(Textdraw2, 0);
TextDrawUseBox(Textdraw2, true);
TextDrawBoxColor(Textdraw2, 102);
TextDrawSetShadow(Textdraw2, 0);
TextDrawSetOutline(Textdraw2, 0);
TextDrawFont(Textdraw2, 0);
Textdraw3 = TextDrawCreate(34.000000, 150.577774, "Login");
TextDrawLetterSize(Textdraw3, 0.247998, 1.388443);
TextDrawAlignment(Textdraw3, 1);
TextDrawColor(Textdraw3, -1);
TextDrawSetShadow(Textdraw3, 0);
TextDrawSetOutline(Textdraw3, 1);
TextDrawBackgroundColor(Textdraw3, 51);
TextDrawFont(Textdraw3, 1);
TextDrawSetProportional(Textdraw3, 1);
TextDrawSetSelectable(Textdraw3, true);
Textdraw4 = TextDrawCreate(36.500000, 171.733337, "Register");
TextDrawLetterSize(Textdraw4, 0.277000, 1.351109);
TextDrawTextSize(Textdraw4, -4.000000, -1.244444);
TextDrawAlignment(Textdraw4, 1);
TextDrawColor(Textdraw4, -1);
TextDrawSetShadow(Textdraw4, 0);
TextDrawSetOutline(Textdraw4, 1);
TextDrawBackgroundColor(Textdraw4, 51);
TextDrawFont(Textdraw4, 1);
TextDrawSetProportional(Textdraw4, 1);
TextDrawSetSelectable(Textdraw4, true);
Textdraw5 = TextDrawCreate(42.000000, 191.022216, "Hilfe");
TextDrawLetterSize(Textdraw5, 0.303499, 1.263998);
TextDrawAlignment(Textdraw5, 1);
TextDrawColor(Textdraw5, -1);
TextDrawSetShadow(Textdraw5, 0);
TextDrawSetOutline(Textdraw5, 1);
TextDrawBackgroundColor(Textdraw5, 51);
TextDrawFont(Textdraw5, 1);
TextDrawSetProportional(Textdraw5, 1);
TextDrawSetSelectable(Textdraw5, true);
return 1;
}
public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
if(_:clickedid != INVALID_TEXT_DRAW)
{
if(clickedid == Textdraw3)
{
SendClientMessage(playerid,Blau,"Login");
return 1;
}
else if(clickedid == Textdraw4)
{
SendClientMessage(playerid,Blau,"Register");
return 1;
}
else if(clickedid == Textdraw5)
{
SendClientMessage(playerid,Hblau,"Hilfe");
return 1;
}
}
return 1;
}
Joa wenn nochmal was fehlt drunter schreiben dann poste ich es. Ich hoffe mir kann jemand helfen :3
MFG.