abend, ich versteh nicht warum das nicht geht, es wird zwar der dialog angezeigt, doch wen man was andrückt passiert nichts warum?
#include <a_samp>
#pragma tabsize 0
#define COLOR_RED 0xAA3333AA
#define DIALOG_WAFFEN 5
new waffelsenter;
new waffelsexit;
new waffelsbuypoint;
public OnGameModeInit()
{
waffelsenter=CreatePickup(1318,1,1368.9952,-1279.7102,13.5469);
waffelsexit=CreatePickup(1318,1,316.3637,-170.2962,999.5938);
waffelsbuypoint=CreatePickup(1318,1,312.2401,-164.5693,999.6010);
return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid==waffelsenter)
{
SetPlayerPos(playerid,316.6298,-167.7823,999.5938);
SetPlayerFacingAngle(playerid,3.0573);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid,6);
}
if(pickupid==waffelsexit)
{
SetPlayerPos(playerid,1366.9709,-1279.7778,13.5469);
SetPlayerFacingAngle(playerid,92.6447);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid,0);
}
if(pickupid==waffelsbuypoint)
{
SetPlayerFacingAngle(playerid,181.0323);
SetCameraBehindPlayer(playerid);
SetPlayerPos(playerid,312.0654,-166.1407,999.6010);
ShowPlayerDialog(playerid,DIALOG_WAFFEN,DIALOG_STYLE_LIST,"Willkommen beim Waffenshop ls","AK 47 800$\nMP 5 700$\nArmour 1000$\nDesert Eagle 700$","Kaufen","Abbruch");
}
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid==DIALOG_WAFFEN)
{
if(response==5)
{
switch(listitem)
{
case 0 :
{
if GetPlayerMoney(playerid) > 800
*then
{
GivePlayerWeapon(playerid,30, 200);
SendClientMessage(playerid,0xFF0000B2,"Du hast dir für 800$ eine AK 47 gekauft!||________");
GivePlayerMoney(playerid, -800);
}
else
{
SendClientMessage(playerid, 0xFFFFFFFF, "Du hast nicht genügend Geld!||You do not have enough money!");
TogglePlayerControllable(playerid, 1);
return 1;
}
}
case 1 :
{
if GetPlayerMoney(playerid) > 700
*then
{
GivePlayerWeapon(playerid,29, 200);
SendClientMessage(playerid,0xFF0000B2,"Du hast dir für 700$ eine MP 5 gekauft||_________");
GivePlayerMoney(playerid, -700);
}
else
{
SendClientMessage(playerid, 0xFFFFFFFF, "Du hast nicht genügend Geld!||You do not have enough money!");
TogglePlayerControllable(playerid, 1);
return 1;
}
}
case 2 :
{
if GetPlayerMoney(playerid) > 1000
*then
{
SetPlayerArmour(playerid, 100.0);
SendClientMessage(playerid,0xFF0000B2,"Du hast dir eine Schutzweste für 1000$ gekauft!||_______");
GivePlayerMoney(playerid, -1000);
}
else
{
SendClientMessage(playerid, 0xFFFFFFFF, "Du hast nicht genügend Geld!||You do not have enough money!");
TogglePlayerControllable(playerid, 1);
return 1;
}
}
case 3 :
{
if GetPlayerMoney(playerid) > 700
*then
{
GivePlayerWeapon(playerid,24, 100);
SendClientMessage(playerid,0xFF0000B2,"Du hast dir für 700$ eine Desert Eagle gekauft!||______");
GivePlayerMoney(playerid, -700);
}
else
{
SendClientMessage(playerid, 0xFFFFFFFF, "Du hast nicht genügend Geld!||You do not have enough money!");
TogglePlayerControllable(playerid, 1);
return 1;
}
}
}
return 1;
}
}
return 0;
}