#include
new schwarzmartk;
#define DIALOG_SMARKT 999
#define ROT 0xE10000FF
public OnFilterScriptInit()
{
schwarzmartk = CreatePickup(1239,2,2787.6399,-2426.0586,13.6337,-1);
Create3DTextLabel("Schwarz Markt",ROT,2787.6399,-2426.0586,13.6337,15,0);
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp("/smarkt",cmdtext, true, 10) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 7.0,2787.6399,-2426.0586,13.6337))
ShowPlayerDialog(playerid,DIALOG_SMARKT,DIALOG_STYLE_LIST,"Schwarz Markt","M4 400Schuss\nAK47 400Schuss\nMP5 400Schuss\nArmor\nMesser","Kaufen","Exit");
}
return 0;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == schwarzmartk)
{
SendClientMessage(playerid,ROT,"Willkommen in Schwarz Markt");
SendClientMessage(playerid,ROT,"mit /smarkt öffnest du das Menü");
}
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch(dialogid == DIALOG_SMARKT)
{
case DIALOG_SMARKT:
{
{
if(response == 0)
return 1;
}
switch(listitem == 999)
{
case 0:
{
if(GetPlayerMoney(playerid) <3400) return SendClientMessage(playerid,ROT,"Du hast nicht genug Geld.");
GivePlayerMoney(playerid,-3400);
GivePlayerWeapon(playerid,31,400);
}
case 1:
{
if(GetPlayerMoney(playerid) <3250) return SendClientMessage(playerid,ROT,"Du hast nicht genug Geld.");
GivePlayerMoney(playerid,-3250);
GivePlayerWeapon(playerid,30,400);
}
case 2:
{
if(GetPlayerMoney(playerid) <2400) return SendClientMessage(playerid,ROT,"Du hast nicht genug Geld.");
GivePlayerMoney(playerid,-2400);
GivePlayerWeapon(playerid,29,400);
}
case 3:
{
if(GetPlayerMoney(playerid) <350) return SendClientMessage(playerid,ROT,"Du hast nicht genug Geld.");
GivePlayerMoney(playerid,-350);
SetPlayerArmour(playerid,100);
}
case 4:
{
if(GetPlayerMoney(playerid) <400) return SendClientMessage(playerid,ROT,"Du hast nicht genug Geld.");
GivePlayerMoney(playerid,-400);
GivePlayerWeapon(playerid,4,1);
}
}
}
}
return 0;
}</a_samp>
was ist falsch?