Results 1 to 10 of 34

Thread: Shop don't Work

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #32
    Private
    Join Date
    Jan 2013
    Location
    Hungary
    Posts
    113
    Thanks
    10
    Thanked 74 Times in 45 Posts
    Use this, it looks better:

    PHP Code:
    shophresponse )
    {
        
    self iPrintln("Loool the script has reached this point: 1"); // delete this row if the script works!!!
        
    if (! isDefined(self.pers["team"]) || self.pers["team"] == "spectator")
            return;

        
    self iPrintln("Loool the script has reached this point: 2"); // delete this row if the script works!!!
        
    if (self.pers["team"] != "allies" || ! isDefined(self.argent))
            return;

        
    self iPrintln("Loool the script has reached this point: 3"); // delete this row if the script works!!!
        
    switch (response)
        {
            case 
    "energy1":
                
    price 400// set the price of the product
                
    if (self.argent price)
                {
                    
    self iprintlnbold("^2Y^7ou ^2M^7ust ^2H^7ave " price " ^2M^7oney");
                }
                else
                {
                    
    self.argent -= price;

                    
    self takeWeapon("frag_grenade_american_mp");
                    
    self giveWeapon("frag_grenade_american_mp");
                    
    self setWeaponClipAmmo("frag_grenade_american_mp"1);
                    
    self iprintlnbold("^2Y^7ou ^2G^7ot 1 ^2N^7ade  ^2[^4-" price "^2]");
                }
            break;

            case 
    "energy2":
                
    price 1000// set the price of the product
                
    if (self.argent price)
                {
                    
    self iprintlnbold("^2Y^7ou ^2M^7ust ^2H^7ave " price " ^2M^7oney");
                }
                else
                {
                    
    self.argent -= price;

                    
    self takeWeapon("frag_grenade_american_mp");
                    
    self giveWeapon("frag_grenade_american_mp");
                    
    self setWeaponClipAmmo("frag_grenade_american_mp"3);
                    
    self iprintlnbold("^2Y^7ou ^2G^7ot 3 ^2N^7ades  ^2[^4-" price "^2]");
                }
            break;

            default:
            break;
        }


  2. The Following User Says Thank You to randall For This Useful Post:

    EnergY (25th May 2013)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •