Look here:
if (strcmp("/buygun", cmdtext, true) == 0)
{
SendClientMessage(playerid,COLOR_RED,"/buygun [Waffenname]");
SendClientMessage(playerid,WEISS,"Deagle(200$), M4(180$), Shotgun(100$), MP5(120$), AK47(150$), Sniper(500$)");
return 1;
}
if (strcmp("/buygun deagle", cmdtext, true)==0)
{
{
if(GetPlayerMoney(playerid)< 200) return SendClientMessage(playerid,COLOR_RED,"Du hast keine 200 $ bei dir.");
}
{
if(IsPlayerInRangeOfPoint(playerid,17,2172.2349,1618.6982,999.9766) || IsPlayerInRangeOfPoint(playerid,17,292.1797,-34.8225,1001.5156))
{
if(GetPlayerMoney(playerid) <200)return SendClientMessage(playerid,COLOR_RED,"Du hast keine 200$.");
GivePlayerWeapon(playerid, 24, 150);
GivePlayerMoney(playerid, -200);
SendClientMessage(playerid,WEISS,"Du hast dir eine Deagle gekauft");
}
else SendClientMessage(playerid,COLOR_GREY,"Du bist nicht im Gunshop!");
return 1;
}
}
if (strcmp("/buygun m4", cmdtext, true)==0)
{
{
if(GetPlayerMoney(playerid)< 200) return SendClientMessage(playerid,COLOR_RED,"Du hast keine 200 $ bei dir.");
}
{
if(IsPlayerInRangeOfPoint(playerid,17,2172.2349,1618.6982,999.9766) || IsPlayerInRangeOfPoint(playerid,17,292.1797,-34.8225,1001.5156))
{
if(GetPlayerMoney(playerid) <180)return SendClientMessage(playerid,COLOR_RED,"Du hast keine 180$.");
GivePlayerWeapon(playerid, 31, 150);
GivePlayerMoney(playerid, -180);
SendClientMessage(playerid,WEISS,"Du hast dir eine M4 gekauft");
}
else SendClientMessage(playerid,COLOR_GREY,"Du bist nicht im Gunshop!");
return 1;
}
}
if (strcmp("/buygun Shotgun", cmdtext, true)==0)
{
{
if(GetPlayerMoney(playerid)< 100) return SendClientMessage(playerid,COLOR_RED,"Du hast keine 100 $ bei dir.");
}
{
if(IsPlayerInRangeOfPoint(playerid,17,2172.2349,1618.6982,999.9766) || IsPlayerInRangeOfPoint(playerid,17,292.1797,-34.8225,1001.5156))
{
if(GetPlayerMoney(playerid) <100)return SendClientMessage(playerid,COLOR_RED,"Du hast keine 100$.");
GivePlayerWeapon(playerid, 25, 150);
GivePlayerMoney(playerid, -100);
SendClientMessage(playerid,WEISS,"Du hast dir eine Shotgun gekauft");
}
else SendClientMessage(playerid,COLOR_GREY,"Du bist nicht im Gunshop!");
return 1;
}
}
if (strcmp("/buygun mp5", cmdtext, true)==0)
{
{
if(GetPlayerMoney(playerid)< 120) return SendClientMessage(playerid,COLOR_RED,"Du hast keine 120 $ bei dir.");
}
{
if(IsPlayerInRangeOfPoint(playerid,17,2172.2349,1618.6982,999.9766) || IsPlayerInRangeOfPoint(playerid,17,292.1797,-34.8225,1001.5156))
{
if(GetPlayerMoney(playerid) <120)return SendClientMessage(playerid,COLOR_RED,"Du hast keine 120$.");
GivePlayerWeapon(playerid, 29, 150);
GivePlayerMoney(playerid, -120);
SendClientMessage(playerid,WEISS,"Du hast dir eine MP5 gekauft");
}
else SendClientMessage(playerid,COLOR_GREY,"Du bist nicht im Gunshop!");
return 1;
}
}
if (strcmp("/buygun ak47", cmdtext, true)==0)
{
{
if(GetPlayerMoney(playerid)< 150) return SendClientMessage(playerid,COLOR_RED,"Du hast keine 150 $ bei dir.");
}
{
if(IsPlayerInRangeOfPoint(playerid,17,2172.2349,1618.6982,999.9766) || IsPlayerInRangeOfPoint(playerid,17,292.1797,-34.8225,1001.5156))
{
if(GetPlayerMoney(playerid) <150)return SendClientMessage(playerid,COLOR_RED,"Du hast keine 150$.");
GivePlayerWeapon(playerid, 30, 150);
GivePlayerMoney(playerid, -150);
SendClientMessage(playerid,WEISS,"Du hast dir eine AK - 47 gekauft");
}
else SendClientMessage(playerid,COLOR_GREY,"Du bist nicht im Gunshop!");
return 1;
}
}
if (strcmp("/buygun sniper", cmdtext, true)==0)
{
{
if(GetPlayerMoney(playerid)< 500) return SendClientMessage(playerid,COLOR_RED,"Du hast keine 500 $ bei dir.");
}
{
if(IsPlayerInRangeOfPoint(playerid,17,2172.2349,1618.6982,999.9766) || IsPlayerInRangeOfPoint(playerid,17,292.1797,-34.8225,1001.5156))
{
if(GetPlayerMoney(playerid) <500)return SendClientMessage(playerid,COLOR_RED,"Du hast keine 500$.");
GivePlayerWeapon(playerid, 34, 50);
GivePlayerMoney(playerid, -500);
SendClientMessage(playerid,WEISS,"Du hast dir eine Sniper gekauft");
}
else SendClientMessage(playerid,COLOR_GREY,"Du bist nicht im Gunshop!");
return 1;
}
}