[Pomoc]/buygun gde koordinate da stavim

Započeo Ljube_Savic
11. Nov. 2011. Zaključano
798
pregleda
11
postova
Ljube_Savic
4
Enforcer
11. Nov. 2011.
Skripta koju koristim:GTA-RP
Detaljan opis problema:gde ovde da stavim koordinate gde ce da se kuca /buygun hvala unapred
Deo skripte:if (strcmp(cmd, "/buygun", true) == 0)
{
   if(IsPlayerConnected(playerid))
   {
       if(GetPlayerMoney(playerid) < 1)
{
   SendClientMessage(playerid, COLOR_GREY, "   Nemas dovoljno novca !");
   return 1;
}
new gun;
new gunid;
new gunstring1;
new gunstring2;
new gunstring3;
new gunstring4;
new gunstring5;
new infostring;
new guncharge;
new ammocharge;
new location = PlayerInfo;
if(location == 99 || location == 100 || location == 102)
{
   if(BizzInfo[location-99] <= 0)
   {
       GameTextForPlayer(playerid, "~r~Nema dovoljno produkata", 5000, 1);
return 1;
   }
new mod = 100;
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
format(string, sizeof(string), "USAGE: /buygun ");
SendClientMessage(playerid, COLOR_GREEN,"_______________________________________");
SendClientMessage(playerid, COLOR_WHITE,"*** Guns & Ammo ***");
SendClientMessage(playerid, COLOR_GRAD2,string);
format(gunstring1, 256, "Weapons: parachute ($%d) golfclub ($%d) nightstick ($%d) baseballbat ($%d) shovel ($%d) poolcue ($%d)",
GunPrice/100*mod,GunPrice/100*mod,GunPrice/100*mod,GunPrice/100*mod,GunPrice/100*mod,GunPrice/100*mod,GunPrice/100*mod);
SendClientMessage(playerid, COLOR_GRAD3, gunstring1);
format(gunstring2, 256, "Weapons: purpledildo ($%d) whitedildo ($%d) longwhitedildo ($%d) whitedildo2 ($%d) flowers ($%d) cane",
GunPrice/100*mod,GunPrice/100*mod,GunPrice/100*mod,GunPrice/100*mod,GunPrice/100*mod,GunPrice/100*mod);
SendClientMessage(playerid, COLOR_GRAD3, gunstring2);
format(gunstring3, 256, "Weapons: sdpistol ($%d) deagle ($%d) mp5 ($%d)",
GunPrice/100*mod,GunPrice/100*mod,GunPrice/100*mod,GunPrice/100*mod,GunPrice/100*mod,GunPrice/100*mod);
SendClientMessage(playerid, COLOR_GRAD3, gunstring3);
format(gunstring4, 256, "Weapons: shotgun ($%d) ak47 ($%d) m4 ($%d) rifle ($%d)",
GunPrice/100*mod,GunPrice/100*mod,GunPrice/100*mod,GunPrice/100*mod,GunPrice/100*mod,GunPrice/100*mod);
SendClientMessage(playerid, COLOR_GRAD3, gunstring4);
format(gunstring5, 256, "Weapons: pistolammo ($%d) shotgunammo ($%d) smgammo ($%d) assaultammo ($%d) rifleammo ($%d)",
GunPrice,GunPrice,GunPrice,GunPrice,GunPrice);
SendClientMessage(playerid, COLOR_GRAD3, gunstring5);
SendClientMessage(playerid, COLOR_GREEN,"_______________________________________");
return 1;
}
strmid(gunid, tmp, 0, strlen(cmdtext), 255);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
format(string, sizeof(string), "USAGE: /buygun ");
return 1;
}
new ammo = strval(tmp);
if(ammo < 1 || ammo > 999) { SendClientMessage(playerid, COLOR_GREY, "   Municija ne moze ispod 1 ili vise od 999 metaka !"); return 1; }
if (strcmp(gunid, "parachute", true, strlen(gunid)) == 0)
{
gun = 46;
guncharge = GunPrice/100*mod;
ammocharge = 0;
}
else if (strcmp(gunid, "golfclub", true, strlen(gunid)) == 0)
{
gun = 2; guncharge = GunPrice/100*mod; ammocharge = 0;
//PlayerInfo = 2; PlayerInfo = 1;
}
else if (strcmp(gunid, "nightstick", true, strlen(gunid)) == 0)
{
gun = 3; guncharge = GunPrice/100*mod; ammocharge = 0;
//PlayerInfo = 3; PlayerInfo = 1;
}
else if (strcmp(gunid, "baseballbat", true, strlen(gunid)) == 0)
{
gun = 5; guncharge = GunPrice/100*mod; ammocharge = 0;
//PlayerInfo = 5; PlayerInfo = 1;
}
else if (strcmp(gunid, "shovel", true, strlen(gunid)) == 0)
{
gun = 6; guncharge = GunPrice/100*mod; ammocharge = 0;
//PlayerInfo = 6; PlayerInfo = 1;
}
else if (strcmp(gunid, "poolcue", true, strlen(gunid)) == 0)
{
gun = 7; guncharge = GunPrice/100*mod; ammocharge = 0;
//PlayerInfo = 7; PlayerInfo = 1;
}
else if (strcmp(gunid, "purpledildo", true, strlen(gunid)) == 0)
{
gun = 10; guncharge = GunPrice/100*mod; ammocharge = 0;
//PlayerInfo = 10; PlayerInfo = 1;
}
else if (strcmp(gunid, "whitedildo", true, strlen(gunid)) == 0)
{
gun = 11; guncharge = GunPrice/100*mod; ammocharge = 0;
//PlayerInfo = 11; PlayerInfo = 1;
}
else if (strcmp(gunid, "longwhitedildo", true, strlen(gunid)) == 0)
{
gun = 12; guncharge = GunPrice/100*mod; ammocharge = 0;
//PlayerInfo = 12; PlayerInfo = 1;
}
else if (strcmp(gunid, "whitedildo2", true, strlen(gunid)) == 0)
{
gun = 13; guncharge = GunPrice/100*mod; ammocharge = 0;
//PlayerInfo = 13; PlayerInfo = 1;
}
else if (strcmp(gunid, "flowers", true, strlen(gunid)) == 0)
{
gun = 14; guncharge = GunPrice/100*mod; ammocharge = 0;
//PlayerInfo = 14; PlayerInfo = 1;
}
else if (strcmp(gunid, "cane", true, strlen(gunid)) == 0)
{
gun = 15; guncharge = GunPrice/100*mod; ammocharge = 0;
//PlayerInfo = 15; PlayerInfo = 1;
}
else if (strcmp(gunid, "sdpistol", true, strlen(gunid)) == 0)
{
gun = 23; guncharge = GunPrice/100*mod; ammocharge = GunPrice*ammo;
//PlayerInfo = 23; PlayerInfo = ammo;
}
else if (strcmp(gunid, "deagle", true, strlen(gunid)) == 0)
{
gun = 24; guncharge = GunPrice/100*mod; ammocharge = GunPrice*ammo;
//PlayerInfo = 24; PlayerInfo = ammo;
}
else if (strcmp(gunid, "mp5", true, strlen(gunid)) == 0)
{
gun = 29; guncharge = GunPrice/100*mod; ammocharge = GunPrice*ammo;
//PlayerInfo = 29; PlayerInfo = ammo;
}
else if (strcmp(gunid, "shotgun", true, strlen(gunid)) == 0)
{
gun = 25; guncharge = GunPrice/100*mod; ammocharge = GunPrice*ammo;
//PlayerInfo = 25; PlayerInfo = ammo;
}
else if (strcmp(gunid, "ak47", true, strlen(gunid)) == 0)
{
gun = 30; guncharge = GunPrice/100*mod; ammocharge = GunPrice*ammo;
//PlayerInfo = 30; PlayerInfo = ammo;
}
else if (strcmp(gunid, "m4", true, strlen(gunid)) == 0)
{
gun = 31; guncharge = GunPrice/100*mod; ammocharge = GunPrice*ammo;
//PlayerInfo = 31; PlayerInfo = ammo;
}
else if (strcmp(gunid, "rifle", true, strlen(gunid)) == 0)
{
gun = 33; guncharge = GunPrice/100*mod; ammocharge = GunPrice*ammo;
//PlayerInfo = 33; PlayerInfo = ammo;
}
else
{
SendClientMessage(playerid, COLOR_GRAD6, "ShopKeeper says: I have never heard of that weapon.");
return 1;
}
if((guncharge+ammocharge) > GetPlayerMoney(playerid))
{
format(infostring, 256, "   Nemas $%d kod sebe !",guncharge+ammocharge);
SendClientMessage(playerid, COLOR_GRAD3, infostring);
return 1;
}
if(GetPlayerMoney(playerid) < (guncharge+ammocharge))
{
   SendClientMessage(playerid, COLOR_GREY, "   Can't afford that !");
   return 1;
}
new payout = guncharge + ammocharge;
format(infostring, 256, "Kupili ste %s sa %d municije za $%d",gunid,ammo,payout);
SendClientMessage(playerid, COLOR_GRAD3, infostring);
if(location == 102 && IsACop(playerid)) { }
else { SafeGivePlayerMoney(playerid, - payout); }
BizzInfo[location-99] += payout;
ExtortionBiz(location-99, payout);
BizzInfo[location-99]--;
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
SafeGivePlayerWeapon(playerid, gun, ammo);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "%s je kupio oruzje za $%d u bizu %d", sendername, payout, location-99);
printf("%s", string);
PayLog(string);
}
else
{
   SendClientMessage(playerid, COLOR_WHITE,"Niste u prodavnici.");
return 1;
}
}
return 1;
}
Neke slike/video za lakse dobivanje pomoci(neobavezno):
FlasHica
5
Kingpin
11. Nov. 2011.
Dodaj na vrh..
if(!IsPlayerInangeOfPoint(playerid , 2.0, x,y,z)) return 1;
što bi značilo ako igrač nije na tom mjestu(x,y,z) nemože koristit komandu!
Ljube_Savic
4
Enforcer
11. Nov. 2011.
znam da je to, al nmg da nadjem u ovom delu skripte
Deleted User
Obrisan korisnik
11. Nov. 2011.
if (strcmp(cmd, "/buygun", true) == 0)
  {
      if(IsPlayerConnected(playerid))
      {
      if(!IsPlayerInangeOfPoint(playerid , 2.0, x,y,z)) return 1; 
          if(GetPlayerMoney(playerid) < 1)
        {
            SendClientMessage(playerid, COLOR_GREY, "  Nemas dovoljno novca !");
            return 1;
        }
        new gun;
        new gunid;
        new gunstring1;
        new gunstring2;
        new gunstring3;
        new gunstring4;
        new gunstring5;
        new infostring;
        new guncharge;
        new ammocharge;
        new location = PlayerInfo;
        if(location == 99 || location == 100 || location == 102)
        {
            if(BizzInfo[location-99] <= 0)
            {
                GameTextForPlayer(playerid, "~r~Nema dovoljno produkata", 5000, 1);
              return 1;
            }
            new mod = 100;
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
              format(string, sizeof(string), "USAGE: /buygun ");
              SendClientMessage(playerid, COLOR_GREEN,"_______________________________________");
              SendClientMessage(playerid, COLOR_WHITE,"*** Guns & Ammo ***");
              SendClientMessage(playerid, COLOR_GRAD2,string);
              format(gunstring1, 256, "Weapons: parachute ($%d) golfclub ($%d) nightstick ($%d) baseballbat ($%d) shovel ($%d) poolcue ($%d)",
              GunPrice/100*mod,GunPrice/100*mod,GunPrice/100*mod,GunPrice/100*mod,GunPrice/100*mod,GunPrice/100*mod,GunPrice/100*mod);
              SendClientMessage(playerid, COLOR_GRAD3, gunstring1);
              format(gunstring2, 256, "Weapons: purpledildo ($%d) whitedildo ($%d) longwhitedildo ($%d) whitedildo2 ($%d) flowers ($%d) cane",
              GunPrice/100*mod,GunPrice/100*mod,GunPrice/100*mod,GunPrice/100*mod,GunPrice/100*mod,GunPrice/100*mod);
              SendClientMessage(playerid, COLOR_GRAD3, gunstring2);
              format(gunstring3, 256, "Weapons: sdpistol ($%d) deagle ($%d) mp5 ($%d)",
              GunPrice/100*mod,GunPrice/100*mod,GunPrice/100*mod,GunPrice/100*mod,GunPrice/100*mod,GunPrice/100*mod);
              SendClientMessage(playerid, COLOR_GRAD3, gunstring3);
              format(gunstring4, 256, "Weapons: shotgun ($%d) ak47 ($%d) m4 ($%d) rifle ($%d)",
              GunPrice/100*mod,GunPrice/100*mod,GunPrice/100*mod,GunPrice/100*mod,GunPrice/100*mod,GunPrice/100*mod);
              SendClientMessage(playerid, COLOR_GRAD3, gunstring4);
              format(gunstring5, 256, "Weapons: pistolammo ($%d) shotgunammo ($%d) smgammo ($%d) assaultammo ($%d) rifleammo ($%d)",
              GunPrice,GunPrice,GunPrice,GunPrice,GunPrice);
              SendClientMessage(playerid, COLOR_GRAD3, gunstring5);
              SendClientMessage(playerid, COLOR_GREEN,"_______________________________________");
              return 1;
            }
            strmid(gunid, tmp, 0, strlen(cmdtext), 255);
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
              format(string, sizeof(string), "USAGE: /buygun ");
              return 1;
            }
            new ammo = strval(tmp);
            if(ammo < 1 || ammo > 999) { SendClientMessage(playerid, COLOR_GREY, "  Municija ne moze ispod 1 ili vise od 999 metaka !"); return 1; }
            if (strcmp(gunid, "parachute", true, strlen(gunid)) == 0)
            {
              gun = 46;
              guncharge = GunPrice/100*mod;
              ammocharge = 0;
            }
            else if (strcmp(gunid, "golfclub", true, strlen(gunid)) == 0)
            {
              gun = 2; guncharge = GunPrice/100*mod; ammocharge = 0;
              //PlayerInfo = 2; PlayerInfo = 1;
            }
            else if (strcmp(gunid, "nightstick", true, strlen(gunid)) == 0)
            {
              gun = 3; guncharge = GunPrice/100*mod; ammocharge = 0;
              //PlayerInfo = 3; PlayerInfo = 1;
            }
            else if (strcmp(gunid, "baseballbat", true, strlen(gunid)) == 0)
            {
              gun = 5; guncharge = GunPrice/100*mod; ammocharge = 0;
              //PlayerInfo = 5; PlayerInfo = 1;
            }
            else if (strcmp(gunid, "shovel", true, strlen(gunid)) == 0)
            {
              gun = 6; guncharge = GunPrice/100*mod; ammocharge = 0;
              //PlayerInfo = 6; PlayerInfo = 1;
            }
            else if (strcmp(gunid, "poolcue", true, strlen(gunid)) == 0)
            {
              gun = 7; guncharge = GunPrice/100*mod; ammocharge = 0;
              //PlayerInfo = 7; PlayerInfo = 1;
            }
            else if (strcmp(gunid, "purpledildo", true, strlen(gunid)) == 0)
            {
              gun = 10; guncharge = GunPrice/100*mod; ammocharge = 0;
              //PlayerInfo = 10; PlayerInfo = 1;
            }
            else if (strcmp(gunid, "whitedildo", true, strlen(gunid)) == 0)
            {
              gun = 11; guncharge = GunPrice/100*mod; ammocharge = 0;
              //PlayerInfo = 11; PlayerInfo = 1;
            }
            else if (strcmp(gunid, "longwhitedildo", true, strlen(gunid)) == 0)
            {
              gun = 12; guncharge = GunPrice/100*mod; ammocharge = 0;
              //PlayerInfo = 12; PlayerInfo = 1;
            }
            else if (strcmp(gunid, "whitedildo2", true, strlen(gunid)) == 0)
            {
              gun = 13; guncharge = GunPrice/100*mod; ammocharge = 0;
              //PlayerInfo = 13; PlayerInfo = 1;
            }
            else if (strcmp(gunid, "flowers", true, strlen(gunid)) == 0)
            {
              gun = 14; guncharge = GunPrice/100*mod; ammocharge = 0;
              //PlayerInfo = 14; PlayerInfo = 1;
            }
            else if (strcmp(gunid, "cane", true, strlen(gunid)) == 0)
            {
              gun = 15; guncharge = GunPrice/100*mod; ammocharge = 0;
              //PlayerInfo = 15; PlayerInfo = 1;
            }
            else if (strcmp(gunid, "sdpistol", true, strlen(gunid)) == 0)
            {
              gun = 23; guncharge = GunPrice/100*mod; ammocharge = GunPrice*ammo;
              //PlayerInfo = 23; PlayerInfo = ammo;
            }
            else if (strcmp(gunid, "deagle", true, strlen(gunid)) == 0)
            {
              gun = 24; guncharge = GunPrice/100*mod; ammocharge = GunPrice*ammo;
              //PlayerInfo = 24; PlayerInfo = ammo;
            }
            else if (strcmp(gunid, "mp5", true, strlen(gunid)) == 0)
            {
              gun = 29; guncharge = GunPrice/100*mod; ammocharge = GunPrice*ammo;
              //PlayerInfo = 29; PlayerInfo = ammo;
            }
            else if (strcmp(gunid, "shotgun", true, strlen(gunid)) == 0)
            {
              gun = 25; guncharge = GunPrice/100*mod; ammocharge = GunPrice*ammo;
              //PlayerInfo = 25; PlayerInfo = ammo;
            }
            else if (strcmp(gunid, "ak47", true, strlen(gunid)) == 0)
            {
              gun = 30; guncharge = GunPrice/100*mod; ammocharge = GunPrice*ammo;
              //PlayerInfo = 30; PlayerInfo = ammo;
            }
            else if (strcmp(gunid, "m4", true, strlen(gunid)) == 0)
            {
              gun = 31; guncharge = GunPrice/100*mod; ammocharge = GunPrice*ammo;
              //PlayerInfo = 31; PlayerInfo = ammo;
            }
            else if (strcmp(gunid, "rifle", true, strlen(gunid)) == 0)
            {
              gun = 33; guncharge = GunPrice/100*mod; ammocharge = GunPrice*ammo;
              //PlayerInfo = 33; PlayerInfo = ammo;
            }
            else
            {
              SendClientMessage(playerid, COLOR_GRAD6, "ShopKeeper says: I have never heard of that weapon.");
              return 1;
            }
            if((guncharge+ammocharge) > GetPlayerMoney(playerid))
            {
              format(infostring, 256, "  Nemas $%d kod sebe !",guncharge+ammocharge);
              SendClientMessage(playerid, COLOR_GRAD3, infostring);
              return 1;
            }
            if(GetPlayerMoney(playerid) < (guncharge+ammocharge))
            {
                SendClientMessage(playerid, COLOR_GREY, "  Can't afford that !");
                return 1;
            }
            new payout = guncharge + ammocharge;
            format(infostring, 256, "Kupili ste %s sa %d municije za $%d",gunid,ammo,payout);
            SendClientMessage(playerid, COLOR_GRAD3, infostring);
            if(location == 102 && IsACop(playerid)) { }
            else { SafeGivePlayerMoney(playerid, - payout); }
            BizzInfo[location-99] += payout;
            ExtortionBiz(location-99, payout);
            BizzInfo[location-99]--;
            PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
            SafeGivePlayerWeapon(playerid, gun, ammo);
            GetPlayerName(playerid, sendername, sizeof(sendername));
            format(string, sizeof(string), "%s je kupio oruzje za $%d u bizu %d", sendername, payout, location-99);
            printf("%s", string);
            PayLog(string);
        }
        else
        {
            SendClientMessage(playerid, COLOR_WHITE,"Niste u prodavnici.");
            return 1;
        }
      }
      return 1;
  }

Pa pre provere novca 😉 Eto ti samo stavi kordinate
Ljube_Savic
4
Enforcer
11. Nov. 2011.
uradim ja sve to, ali izbaci mi error undefinied simbol  if(!IsPlayerInangeOfPoint
Deleted User
Obrisan korisnik
12. Nov. 2011.
Umesto
 if(!IsPlayerInangeOfPoint(playerid , 2.0, x,y,z)) return 1;  

stavis
if(!IsPlayerInRangeOfPoint(playerid , 2.0, x,y,z)) return 1; 
Ljube_Savic
4
Enforcer
12. Nov. 2011.
jel mi zavisi ovde dal mogu da kupim gun od produkata u bizu, u GTA-rp modu nema ammonation biz, jel treba nesto da izbrisem iz komande pa da kupovina oruzja ne zavisi od produkata ?
Deleted User
Obrisan korisnik
12. Nov. 2011.
Ljube_Savic wrote on November 12, 2011, 12:08 pm:
jel mi zavisi ovde dal mogu da kupim gun od produkata u bizu, u GTA-rp modu nema ammonation biz, jel treba nesto da izbrisem iz komande pa da kupovina oruzja ne zavisi od produkata ?
            if(BizzInfo[location-99] <= 0)
            {
                GameTextForPlayer(playerid, "~r~Nema dovoljno produkata", 5000, 1);
              return 1;
            }

To obrises
Ljube_Savic
4
Enforcer
12. Nov. 2011.
opet mi pise nisi u prodavnici, imam ja vec jednu filterscriptu za gunove, kupim preko toga gun i sve, al kad idem exit za onaj dialog pise mi server closed conection, tako za svaku
Deleted User
Obrisan korisnik
12. Nov. 2011.
if (strcmp(cmd, "/buygun", true) == 0)
  {
      if(IsPlayerConnected(playerid))
      {
          if(GetPlayerMoney(playerid) < 1)
        {
            SendClientMessage(playerid, COLOR_GREY, "  Nemas dovoljno novca !");
            return 1;
        }
        new gun;
        new gunid;
        new gunstring1;
        new gunstring2;
        new gunstring3;
        new gunstring4;
        new gunstring5;
        new infostring;
        new guncharge;
        new ammocharge;
        new location = PlayerInfo;
        if(IsPlayerInangeOfPoint(playerid , 2.0, x,y,z))//Stavi kordinate
        {
            new mod = 100;
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
              format(string, sizeof(string), "USAGE: /buygun ");
              SendClientMessage(playerid, COLOR_GREEN,"_______________________________________");
              SendClientMessage(playerid, COLOR_WHITE,"*** Guns & Ammo ***");
              SendClientMessage(playerid, COLOR_GRAD2,string);
              format(gunstring1, 256, "Weapons: parachute ($%d) golfclub ($%d) nightstick ($%d) baseballbat ($%d) shovel ($%d) poolcue ($%d)",
              GunPrice/100*mod,GunPrice/100*mod,GunPrice/100*mod,GunPrice/100*mod,GunPrice/100*mod,GunPrice/100*mod,GunPrice/100*mod);
              SendClientMessage(playerid, COLOR_GRAD3, gunstring1);
              format(gunstring2, 256, "Weapons: purpledildo ($%d) whitedildo ($%d) longwhitedildo ($%d) whitedildo2 ($%d) flowers ($%d) cane",
              GunPrice/100*mod,GunPrice/100*mod,GunPrice/100*mod,GunPrice/100*mod,GunPrice/100*mod,GunPrice/100*mod);
              SendClientMessage(playerid, COLOR_GRAD3, gunstring2);
              format(gunstring3, 256, "Weapons: sdpistol ($%d) deagle ($%d) mp5 ($%d)",
              GunPrice/100*mod,GunPrice/100*mod,GunPrice/100*mod,GunPrice/100*mod,GunPrice/100*mod,GunPrice/100*mod);
              SendClientMessage(playerid, COLOR_GRAD3, gunstring3);
              format(gunstring4, 256, "Weapons: shotgun ($%d) ak47 ($%d) m4 ($%d) rifle ($%d)",
              GunPrice/100*mod,GunPrice/100*mod,GunPrice/100*mod,GunPrice/100*mod,GunPrice/100*mod,GunPrice/100*mod);
              SendClientMessage(playerid, COLOR_GRAD3, gunstring4);
              format(gunstring5, 256, "Weapons: pistolammo ($%d) shotgunammo ($%d) smgammo ($%d) assaultammo ($%d) rifleammo ($%d)",
              GunPrice,GunPrice,GunPrice,GunPrice,GunPrice);
              SendClientMessage(playerid, COLOR_GRAD3, gunstring5);
              SendClientMessage(playerid, COLOR_GREEN,"_______________________________________");
              return 1;
            }
            strmid(gunid, tmp, 0, strlen(cmdtext), 255);
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
              format(string, sizeof(string), "USAGE: /buygun ");
              return 1;
            }
            new ammo = strval(tmp);
            if(ammo < 1 || ammo > 999) { SendClientMessage(playerid, COLOR_GREY, "  Municija ne moze ispod 1 ili vise od 999 metaka !"); return 1; }
            if (strcmp(gunid, "parachute", true, strlen(gunid)) == 0)
            {
              gun = 46;
              guncharge = GunPrice/100*mod;
              ammocharge = 0;
            }
            else if (strcmp(gunid, "golfclub", true, strlen(gunid)) == 0)
            {
              gun = 2; guncharge = GunPrice/100*mod; ammocharge = 0;
              //PlayerInfo = 2; PlayerInfo = 1;
            }
            else if (strcmp(gunid, "nightstick", true, strlen(gunid)) == 0)
            {
              gun = 3; guncharge = GunPrice/100*mod; ammocharge = 0;
              //PlayerInfo = 3; PlayerInfo = 1;
            }
            else if (strcmp(gunid, "baseballbat", true, strlen(gunid)) == 0)
            {
              gun = 5; guncharge = GunPrice/100*mod; ammocharge = 0;
              //PlayerInfo = 5; PlayerInfo = 1;
            }
            else if (strcmp(gunid, "shovel", true, strlen(gunid)) == 0)
            {
              gun = 6; guncharge = GunPrice/100*mod; ammocharge = 0;
              //PlayerInfo = 6; PlayerInfo = 1;
            }
            else if (strcmp(gunid, "poolcue", true, strlen(gunid)) == 0)
            {
              gun = 7; guncharge = GunPrice/100*mod; ammocharge = 0;
              //PlayerInfo = 7; PlayerInfo = 1;
            }
            else if (strcmp(gunid, "purpledildo", true, strlen(gunid)) == 0)
            {
              gun = 10; guncharge = GunPrice/100*mod; ammocharge = 0;
              //PlayerInfo = 10; PlayerInfo = 1;
            }
            else if (strcmp(gunid, "whitedildo", true, strlen(gunid)) == 0)
            {
              gun = 11; guncharge = GunPrice/100*mod; ammocharge = 0;
              //PlayerInfo = 11; PlayerInfo = 1;
            }
            else if (strcmp(gunid, "longwhitedildo", true, strlen(gunid)) == 0)
            {
              gun = 12; guncharge = GunPrice/100*mod; ammocharge = 0;
              //PlayerInfo = 12; PlayerInfo = 1;
            }
            else if (strcmp(gunid, "whitedildo2", true, strlen(gunid)) == 0)
            {
              gun = 13; guncharge = GunPrice/100*mod; ammocharge = 0;
              //PlayerInfo = 13; PlayerInfo = 1;
            }
            else if (strcmp(gunid, "flowers", true, strlen(gunid)) == 0)
            {
              gun = 14; guncharge = GunPrice/100*mod; ammocharge = 0;
              //PlayerInfo = 14; PlayerInfo = 1;
            }
            else if (strcmp(gunid, "cane", true, strlen(gunid)) == 0)
            {
              gun = 15; guncharge = GunPrice/100*mod; ammocharge = 0;
              //PlayerInfo = 15; PlayerInfo = 1;
            }
            else if (strcmp(gunid, "sdpistol", true, strlen(gunid)) == 0)
            {
              gun = 23; guncharge = GunPrice/100*mod; ammocharge = GunPrice*ammo;
              //PlayerInfo = 23; PlayerInfo = ammo;
            }
            else if (strcmp(gunid, "deagle", true, strlen(gunid)) == 0)
            {
              gun = 24; guncharge = GunPrice/100*mod; ammocharge = GunPrice*ammo;
              //PlayerInfo = 24; PlayerInfo = ammo;
            }
            else if (strcmp(gunid, "mp5", true, strlen(gunid)) == 0)
            {
              gun = 29; guncharge = GunPrice/100*mod; ammocharge = GunPrice*ammo;
              //PlayerInfo = 29; PlayerInfo = ammo;
            }
            else if (strcmp(gunid, "shotgun", true, strlen(gunid)) == 0)
            {
              gun = 25; guncharge = GunPrice/100*mod; ammocharge = GunPrice*ammo;
              //PlayerInfo = 25; PlayerInfo = ammo;
            }
            else if (strcmp(gunid, "ak47", true, strlen(gunid)) == 0)
            {
              gun = 30; guncharge = GunPrice/100*mod; ammocharge = GunPrice*ammo;
              //PlayerInfo = 30; PlayerInfo = ammo;
            }
            else if (strcmp(gunid, "m4", true, strlen(gunid)) == 0)
            {
              gun = 31; guncharge = GunPrice/100*mod; ammocharge = GunPrice*ammo;
              //PlayerInfo = 31; PlayerInfo = ammo;
            }
            else if (strcmp(gunid, "rifle", true, strlen(gunid)) == 0)
            {
              gun = 33; guncharge = GunPrice/100*mod; ammocharge = GunPrice*ammo;
              //PlayerInfo = 33; PlayerInfo = ammo;
            }
            else
            {
              SendClientMessage(playerid, COLOR_GRAD6, "ShopKeeper says: I have never heard of that weapon.");
              return 1;
            }
            if((guncharge+ammocharge) > GetPlayerMoney(playerid))
            {
              format(infostring, 256, "  Nemas $%d kod sebe !",guncharge+ammocharge);
              SendClientMessage(playerid, COLOR_GRAD3, infostring);
              return 1;
            }
            if(GetPlayerMoney(playerid) < (guncharge+ammocharge))
            {
                SendClientMessage(playerid, COLOR_GREY, "  Can't afford that !");
                return 1;
            }
            new payout = guncharge + ammocharge;
            format(infostring, 256, "Kupili ste %s sa %d municije za $%d",gunid,ammo,payout);
            SendClientMessage(playerid, COLOR_GRAD3, infostring);
            if(location == 102 && IsACop(playerid)) { }
            else { SafeGivePlayerMoney(playerid, - payout); }
            BizzInfo[location-99] += payout;
            ExtortionBiz(location-99, payout);
            BizzInfo[location-99]--;
            PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
            SafeGivePlayerWeapon(playerid, gun, ammo);
            GetPlayerName(playerid, sendername, sizeof(sendername));
            format(string, sizeof(string), "%s je kupio oruzje za $%d u bizu %d", sendername, payout, location-99);
            printf("%s", string);
            PayLog(string);
        }
        else
        {
            SendClientMessage(playerid, COLOR_WHITE,"Niste u prodavnici.");
            return 1;
        }
      }
      return 1;
  }

Nisam obracao paznju da ti imas vec nesto ubaceno. Evo tako stavi komandu samo stavi kordinat
Ljube_Savic
4
Enforcer
12. Nov. 2011.
u redu je sad, namestio sam, hvala

Morate biti prijavljeni da biste odgovorili na ovu temu.

Prijava

© 2026 SmartShark. All rights reserved.

Powered by Momentum|v2026.3.001 Alpha