Ich bin dabei ein Filterscript zu erstellen
und ich hab ein problem
Ich kann die textdraw's nicht anklicken die werden angezeigt etc. aber ich kann sie nicht anklicken
Ich hoffe das mir jemand helfen kann
Pawn Queltext failt bei mir ... keine ahnung wieso -.- (Ich mach es richtig, keine ahnung wieso es nicht funktioniert ;d)
Also poste ich es einfach so hier...
#include <a_samp>
#include <ocmd>
new Text:Textdraw0;
new Text:Textdraw1;
new Text:Textdraw2;
new Text:Textdraw3;
new Text:Textdraw4;
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print("Waffenshop by Msk.");
print("--------------------------------------\n");
CreateObject(355, -98.28, 1362.24, 10.96, 0.00, 0.00, 15.03);
CreateObject(348, -96.73, 1362.54, 11.01, 0.00, 0.00, 11.72);
CreateObject(353, -98.14, 1362.27, 9.99, 0.00, 0.00, 16.84);
CreateObject(349, -96.77, 1362.52, 10.20, 0.00, 0.00, 17.06);
CreateObject(618, -93.75, 1362.52, 7.29, 0.00, 0.00, 359.49);
CreateObject(618, -99.10, 1361.67, 8.12, 0.00, 0.00, 0.51);
CreateObject(3851, -98.20, 1358.69, 9.27, 0.00, 0.00, 192.49);
CreateObject(3851, -98.22, 1358.67, 13.07, 0.00, 0.00, 12.56);
Textdraw0 = TextDrawCreate(196.000000, 144.000000, "Kaufen");//ak47
TextDrawBackgroundColor(Textdraw0, -16776961);
TextDrawFont(Textdraw0, 1);
TextDrawLetterSize(Textdraw0, 0.500000, 1.200000);
TextDrawColor(Textdraw0, 16777215);
TextDrawSetOutline(Textdraw0, 1);
TextDrawSetProportional(Textdraw0, 0);
TextDrawUseBox(Textdraw0, 1);
TextDrawBoxColor(Textdraw0, 16711935);
TextDrawTextSize(Textdraw0, 262.000000, 0.000000);
TextDrawSetSelectable(Textdraw0, 1);
Textdraw1 = TextDrawCreate(386.000000, 144.000000, "Kaufen");//deagle
TextDrawBackgroundColor(Textdraw1, -16776961);
TextDrawFont(Textdraw1, 1);
TextDrawLetterSize(Textdraw1, 0.500000, 1.200000);
TextDrawColor(Textdraw1, 16777215);
TextDrawSetOutline(Textdraw1, 1);
TextDrawSetProportional(Textdraw1, 0);
TextDrawUseBox(Textdraw1, 1);
TextDrawBoxColor(Textdraw1, 16711935);
TextDrawTextSize(Textdraw1, 449.000000, 0.000000);
TextDrawSetSelectable(Textdraw1, 1);
Textdraw2 = TextDrawCreate(386.000000, 260.000000, "Kaufen");// shotgun
TextDrawBackgroundColor(Textdraw2, -16776961);
TextDrawFont(Textdraw2, 1);
TextDrawLetterSize(Textdraw2, 0.500000, 1.200000);
TextDrawColor(Textdraw2, 16777215);
TextDrawSetOutline(Textdraw2, 1);
TextDrawSetProportional(Textdraw2, 0);
TextDrawUseBox(Textdraw2, 1);
TextDrawBoxColor(Textdraw2, 16711935);
TextDrawTextSize(Textdraw2, 449.000000, 0.000000);
TextDrawSetSelectable(Textdraw2, 1);
Textdraw3 = TextDrawCreate(211.000000, 290.000000, "Kaufen");//mp5
TextDrawBackgroundColor(Textdraw3, -16776961);
TextDrawFont(Textdraw3, 1);
TextDrawLetterSize(Textdraw3, 0.500000, 1.200000);
TextDrawColor(Textdraw3, 16777215);
TextDrawSetOutline(Textdraw3, 1);
TextDrawSetProportional(Textdraw3, 0);
TextDrawUseBox(Textdraw3, 1);
TextDrawBoxColor(Textdraw3, 16711935);
TextDrawTextSize(Textdraw3, 276.000000, 0.000000);
TextDrawSetSelectable(Textdraw3, 1);
Textdraw4 = TextDrawCreate(301.000000, 333.000000, "...Exit...");
TextDrawBackgroundColor(Textdraw4, -16776961);
TextDrawFont(Textdraw4, 3);
TextDrawLetterSize(Textdraw4, 0.500000, 1.200000);
TextDrawColor(Textdraw4, 16777215);
TextDrawSetOutline(Textdraw4, 1);
TextDrawSetProportional(Textdraw4, 0);
TextDrawUseBox(Textdraw4, 1);
TextDrawBoxColor(Textdraw4, 16711935);
TextDrawTextSize(Textdraw4, 395.000000, 0.000000);
TextDrawSetSelectable(Textdraw4, 1);
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
return 1;
}
ocmd:waffenshop(playerid,params[])
{
SetPlayerPos(playerid,-87.6786,1362.7637,10.2734);
return 1;
}
ocmd:wkaufen(playerid,params[])
{
if(IsPlayerInRangeOfPoint(playerid,7,-97.3091,1362.1595,10.2734))
{
SetPlayerPos(playerid,-96.7126,1358.7589,10.2734);
TogglePlayerControllable(playerid,false);
SetPlayerCameraPos(playerid,-96.7126,1358.7589,10.2734);
SetPlayerCameraLookAt(playerid,-97.3091,1362.1595,10.2734);
SetPlayerChatBubble(playerid,"Kauft Waffen(NO-DM)",0xFFFF6600,10,10000);
TextDrawShowForPlayer(playerid,Textdraw0);
TextDrawShowForPlayer(playerid,Textdraw1);
TextDrawShowForPlayer(playerid,Textdraw2);
TextDrawShowForPlayer(playerid,Textdraw3);
TextDrawShowForPlayer(playerid,Textdraw4);
SelectTextDraw(playerid,0xFFFFFFFF);
}
return 1;
}
public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
if(clickedid == Textdraw0)
{
if(GetPlayerMoney(playerid) > 2000)
{
GivePlayerWeapon(playerid,30,1000);
SendClientMessage(playerid, 0xFFFFFFAA, "Du hast eine AK47 gekauft");
GivePlayerMoney(playerid,-2000);
}
else
{
SendClientMessage(playerid,0xFFFFFFFF,"Du hast zu wenig Geld, du brauchst 2000$");
}
}
if(clickedid == Textdraw1)
{
if(GetPlayerMoney(playerid) > 1000)
{
GivePlayerWeapon(playerid,24,1000);
SendClientMessage(playerid, 0xFFFFFFAA, "Du hast eine Desert Eagle gekauft");
GivePlayerMoney(playerid,-1000);
}
else
{
SendClientMessage(playerid,0xFFFFFFFF,"Du hast zu wenig Geld, du brauchst 1000$");
}
}
if(clickedid == Textdraw2)
{
if(GetPlayerMoney(playerid) > 1400)
{
GivePlayerWeapon(playerid,25,1000);
SendClientMessage(playerid, 0xFFFFFFAA, "Du hast eine Shotgun gekauft");
GivePlayerMoney(playerid,-1400);
}
else
{
SendClientMessage(playerid,0xFFFFFFFF,"Du hast zu wenig Geld, du brauchst 1400$");
}
}
if(clickedid == Textdraw3)
{
if(GetPlayerMoney(playerid) > 1700)
{
GivePlayerWeapon(playerid,29,1000);
SendClientMessage(playerid, 0xFFFFFFAA, "Du hast eine MP5 gekauft");
GivePlayerMoney(playerid,-1700);
}
else
{
SendClientMessage(playerid,0xFFFFFFFF,"Du hast zu wenig Geld, du brauchst 1700$");
}
}
if(clickedid == Textdraw4)
{
CancelSelectTextDraw(playerid);
TogglePlayerControllable(playerid,true);
SetCameraBehindPlayer(playerid);
SetPlayerChatBubble(playerid,"",0xFFFFFFFF,1,1);
TextDrawHideForPlayer(playerid,Textdraw0);
TextDrawHideForPlayer(playerid,Textdraw1);
TextDrawHideForPlayer(playerid,Textdraw2);
TextDrawHideForPlayer(playerid,Textdraw3);
TextDrawHideForPlayer(playerid,Textdraw4);
}
return 1;
}
public OnPlayerConnect(playerid)
{
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
TextDrawHideForPlayer(playerid,Textdraw0);
TextDrawHideForPlayer(playerid,Textdraw1);
TextDrawHideForPlayer(playerid,Textdraw2);
TextDrawHideForPlayer(playerid,Textdraw3);
TextDrawHideForPlayer(playerid,Textdraw4);
return 1;
}