Servus,
kann mal eben jemand diese Textdraws testen, ob die anklickbar sind ?
Sie sollten eigentlich gehen.
Bei mir nämlich komischerweise nicht...
new PlayerText:RightButton[MAX_PLAYERS];
new PlayerText:LeftButton[MAX_PLAYERS];
new PlayerText:UseButton[MAX_PLAYERS];
new PlayerText:DropButton[MAX_PLAYERS];
public OnPlayerConnect(playerid)
{
UseButton[playerid] = CreatePlayerTextDraw(playerid,192.000000, 300.000000, "Benutzen");
PlayerTextDrawBackgroundColor(playerid,UseButton[playerid], 255);
PlayerTextDrawFont(playerid,UseButton[playerid], 2);
PlayerTextDrawLetterSize(playerid,UseButton[playerid], 0.180000, 0.899998);
PlayerTextDrawColor(playerid,UseButton[playerid], -1);
PlayerTextDrawSetOutline(playerid,UseButton[playerid], 0);
PlayerTextDrawSetProportional(playerid,UseButton[playerid], 1);
PlayerTextDrawSetShadow(playerid,UseButton[playerid], 1);
PlayerTextDrawTextSize(playerid,UseButton[playerid],50.000000, 10.000000);
PlayerTextDrawSetSelectable(playerid,UseButton[playerid], 1);
DropButton[playerid] = CreatePlayerTextDraw(playerid,188.000000, 320.000000, "Wegwerfen");
PlayerTextDrawBackgroundColor(playerid,DropButton[playerid], 255);
PlayerTextDrawFont(playerid,DropButton[playerid], 2);
PlayerTextDrawLetterSize(playerid,DropButton[playerid], 0.180000, 0.899998);
PlayerTextDrawColor(playerid,DropButton[playerid], -1);
PlayerTextDrawSetOutline(playerid,DropButton[playerid], 0);
PlayerTextDrawSetProportional(playerid,DropButton[playerid], 1);
PlayerTextDrawSetShadow(playerid,DropButton[playerid], 1);
PlayerTextDrawTextSize(playerid,DropButton[playerid],50.000000, 10.000000);
PlayerTextDrawSetSelectable(playerid,DropButton[playerid], 1);
RightButton[playerid] = CreatePlayerTextDraw(playerid,248.000000, 266.000000, ">");
PlayerTextDrawBackgroundColor(playerid,RightButton[playerid], 255);
PlayerTextDrawFont(playerid,RightButton[playerid], 2);
PlayerTextDrawLetterSize(playerid,RightButton[playerid], 0.219999, 1.199998);
PlayerTextDrawColor(playerid,RightButton[playerid], -16776961);
PlayerTextDrawSetOutline(playerid,RightButton[playerid], 0);
PlayerTextDrawSetProportional(playerid,RightButton[playerid], 1);
PlayerTextDrawSetShadow(playerid,RightButton[playerid], 0);
PlayerTextDrawTextSize(playerid,RightButton[playerid],5.000000, 5.000000);
PlayerTextDrawSetSelectable(playerid,RightButton[playerid], 1);
LeftButton[playerid] = CreatePlayerTextDraw(playerid,218.000000, 266.000000, "<");
PlayerTextDrawBackgroundColor(playerid,LeftButton[playerid], 255);
PlayerTextDrawFont(playerid,LeftButton[playerid], 2);
PlayerTextDrawLetterSize(playerid,LeftButton[playerid], 0.219999, 1.199998);
PlayerTextDrawColor(playerid,LeftButton[playerid], -16776961);
PlayerTextDrawSetOutline(playerid,LeftButton[playerid], 0);
PlayerTextDrawSetProportional(playerid,LeftButton[playerid], 1);
PlayerTextDrawSetShadow(playerid,LeftButton[playerid], 0);
PlayerTextDrawTextSize(playerid,LeftButton[playerid],5.000000, 5.000000);
PlayerTextDrawSetSelectable(playerid,LeftButton[playerid], 1);
}
public OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid)
{
if(playertextid == RightButton[playerid])
{
SendClientMessage(playerid,WEIß,"Jo");
SetPVarInt(playerid,"InvSite",GetPVarInt(playerid,"InvSite")+1);
new string[128];
format(string,sizeof(string),"%d",GetPVarInt(playerid,"InvSite"));
SendClientMessage(playerid,WEIß,string);
UpdateInventory(playerid);
return 1;
}
else if(playertextid == LeftButton[playerid])
{
SendClientMessage(playerid,WEIß,"Jo");
SetPVarInt(playerid,"InvSite",GetPVarInt(playerid,"InvSite")-1);
new string[128];
format(string,sizeof(string),"%d",GetPVarInt(playerid,"InvSite"));
SendClientMessage(playerid,WEIß,string);
if(GetPVarInt(playerid,"InvSite")<0)SetPVarInt(playerid,"InvSite",0);
UpdateInventory(playerid);
return 1;
}
else if(playertextid == DropButton[playerid])
{
SendClientMessage(playerid,WEIß,"Jo");
return 1;
}
else if(playertextid == UseButton[playerid])
{
SendClientMessage(playerid,WEIß,"Jo");
return 1;
}