Code
//Z.b ein Waffenshop
if (strcmp("/shop", cmdtext, true, 10) == 0)
{
if(IsPlayerInRangeOfPoint(playerid,10,295.7135, -38.2883, 1001.5156))
{
ShowPlayerDialog(playerid,DIALOG_WAFFENSHOP,DIALOG_STYLE_LIST,"Waffenshop","Schutzweste 800$\nMesser 500$\nBaseballschläger 700$\nSilencer 1200$\nDesert 3000$\nMP5 5000$\nShoutGun 8000$\nAKM 11000$\nM4 12000$","weiter","Abbrechren");
}else if (IsPlayerInRangeOfPoint(playerid, 7.0, 314.2526,-133.8182,999.6016)){
ShowPlayerDialog(playerid,DIALOG_WAFFENSHOP,DIALOG_STYLE_LIST,"Waffenshop","Schutzweste 800$\nMesser 500$\nBaseballschläger 700$\nSilencer 1200$\nDesert 3000$\nMP5 5000$\nShoutGun 8000$\nAKM 11000$\nM4 12000$","weiter","Abbrechren");
}else if(IsPlayerInRangeOfPoint(playerid,10,295.7135, -38.2883, 1001.5156)) {
ShowPlayerDialog(playerid,DIALOG_WAFFENSHOP,DIALOG_STYLE_LIST,"24/7","Kekse[5] 3$\n","weiter","Abbrechren");
}else {
SendClientMessage(playerid,ROT,"Du bist beim Ammunation");
}
return 1;
}
//dialog
if(dialogid==DIALOG_WAFFENSHOP)//Waffenshop
{
if(response)
{
if(listitem==0)
{
new geld = GetPlayerMoney(playerid);
if(isPlayerAnAdmin(playerid,1))
{
SetPlayerArmour(playerid,100);
SendClientMessage(playerid,GRÜN,"Danke Lucas für die Weste du hast ein gut bei mir");
}else {
if(geld >= 800)
{
SendClientMessage(playerid,GRÜN,"Du hast dir eine Schutzweste gekauft");
SetPlayerArmour(playerid,100);
GivePlayerMoney(playerid, -800);
} else {
SendClientMessage(playerid,ROT,"Du hast nicht genug Geld");
}
}
}
if(listitem==1)
{
new geld = GetPlayerMoney(playerid);
if(geld >= 500)
{
SendClientMessage(playerid,GRÜN,"Du hast dir ein Messer gekauft");
GivePlayerWeapon(playerid, 4, 1);
GivePlayerMoney(playerid, -500);
} else {
SendClientMessage(playerid,ROT,"Du hast nicht genug Geld");
}
}
if(listitem==2)
{
new geld = GetPlayerMoney(playerid);
if(geld >= 700)
{
SendClientMessage(playerid,GRÜN,"Du hast dir ein Baseballschlager gekauft");
GivePlayerWeapon(playerid, 5, 1);
GivePlayerMoney(playerid, -700);
} else {
SendClientMessage(playerid,ROT,"Du hast nicht genug Geld");
}
}
if(listitem==3)
{
if(GetPVarInt(playerid,"agschein")==1)//MP5
{
new geld = GetPlayerMoney(playerid);
if(geld >= 1200)
{
SendClientMessage(playerid,ROT,"Du hast dir 100 Schuss Silencer gekauft");
GivePlayerWeapon(playerid, 24, 100);
GivePlayerMoney(playerid, -1200);
}else {
SendClientMessage(playerid,ROT,"Du hast nicht genug Geld");
}
}else {
SendClientMessage(playerid,ROT,"Du hast kein/den falschen Waffenschein");
}
}
if(listitem==4)
{
if(GetPVarInt(playerid,"agschein")==1)//MP5
{
new geld = GetPlayerMoney(playerid);
if(geld >= 3000)
{
SendClientMessage(playerid,ROT,"Du hast dir 100 Schuss Deagel gekauft");
GivePlayerWeapon(playerid, 24, 100);
GivePlayerMoney(playerid, -3000);
}else {
SendClientMessage(playerid,ROT,"Du hast nicht genug Geld");
}
}else {
SendClientMessage(playerid,ROT,"Du hast kein/den falschen Waffenschein");
}
}
if(listitem==5)
{
if(GetPVarInt(playerid,"agschein")==1)//MP5
{
new geld = GetPlayerMoney(playerid);
if(geld >= 5000)
{
SendClientMessage(playerid,ROT,"Du hast dir 500 Schuss MP5 gekauft");
GivePlayerWeapon(playerid, 29, 500);
GivePlayerMoney(playerid, -5000);
}else {
SendClientMessage(playerid,ROT,"Du hast nicht genug Geld");
}
}else {
SendClientMessage(playerid,ROT,"Du hast kein/den falschen Waffenschein");
}
}
if(listitem==6)
{
if(GetPVarInt(playerid,"gschein")==1)//Shoutgunt
{
new geld = GetPlayerMoney(playerid);
if(geld >= 8000)
{
SendClientMessage(playerid,ROT,"Du hast dir 50 Schuss ShoutGun gekauft");
GivePlayerWeapon(playerid, 25, 50);
GivePlayerMoney(playerid, -8000);
}else {
SendClientMessage(playerid,ROT,"Du hast nicht genug Geld");
}
}else {
SendClientMessage(playerid,ROT,"Du hast kein/den falschen Waffenschein");
}
}
if(listitem==7)//AkM
{
if(GetPVarInt(playerid,"gschein")==1)
{
new geld = GetPlayerMoney(playerid);
if(geld >= 11000)
{
SendClientMessage(playerid,ROT,"Du hast dir 500 Schuss AKM gekauft");
GivePlayerWeapon(playerid, 30, 500);
GivePlayerMoney(playerid, -11000);
}else {
SendClientMessage(playerid,ROT,"Du hast nicht genug Geld");
}
}else {
SendClientMessage(playerid,ROT,"Du hast kein/den falschen Waffenschein");
}
}
if(listitem==8)//M4A1
{
if(GetPVarInt(playerid,"gschein")==1)
{
new geld = GetPlayerMoney(playerid);
if(geld >= 12000)
{
SendClientMessage(playerid,ROT,"Du hast dir 500 Schuss M4 gekauft");
GivePlayerWeapon(playerid, 31, 500);
}else {
SendClientMessage(playerid,ROT,"Du hast nicht genug Geld");
}
}else {
SendClientMessage(playerid,ROT,"Du hast kein/den falschen Waffenschein");
}
}
}
}
Alles anzeigen
M.F.G
Include