Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » problem with lua scripts
problem with lua scripts [message #412452] Sat, 28 November 2009 01:07 Go to previous message
Distrbd21 is currently offline  Distrbd21
Messages: 743
Registered: September 2008
Karma:
Colonel

Ok i have 2 right now that i'm trying to get to work but when i put them on, they don't???
Do i have to have a bot running with them, for them to work?

Here they are one is !B rail the other is First Blood.

if Message == "!b rail" then
               if Purchase_Item(Get_GameObj(pID), 600) == 1 then
                  local pos = Get_Position(Get_GameObj(pID))
                  Grant_Powerup(Get_GameObj(pID), "POW_Railgun_Player")
            Grant_Powerup(Get_GameObj(pID), "CnC_POW_Ammo_ClipMax")
            InputConsole("cmsg 0,230,57 [Weap-Bot]: %s has bought a railgun.", Get_Player_Name_By_ID(pID))
               else
               InputConsole("ppage %d You Need 600 credits to buy this.", pID)
            end
      end

function Killed(ID, obj, killer)
   if ReadINI("LuaPlugins/Misc/Misc.ini", "misc", "firstblood") == "1" then
      KpID = Get_Player_ID(killer)
      DpID = Get_Player_ID(obj)
      if Is_Soldier(obj) == 1 then
         if KpID >= 1 then
            Knick = Get_Player_Name(killer)
            if KpID ~= DpID then
               stored = ReadINI("LuaPlugins/Misc/Misc.ini", "firstblood", "kills")
               givecash = ReadINI("LuaPlugins/Misc/Misc.ini", "firstblood", "cash")
               kilz = stored + 1
               if kilz == 1 then
                  InputConsole("msg ***FIRST BL00D*** | %s, Enjoy $%s for First Blood!", Knick, givecash)
                  pcash = Get_Money(killer)
                  Set_Money(killer, pcash + givecash)
                  InputConsole("ppage %d, Enjoy $%s for First Blood!", KpID, givecash)
                  InputConsole("SNDA mxxdsgn_dsgn0059i1nemg_snd.wav")
                  WriteINI("LuaPlugins/Misc/Misc.ini", "firstblood", "kills", kilz)
               else
                  WriteINI("LuaPlugins/Misc/Misc.ini", "firstblood", "kills", kilz)
               end
            end
         end
      end
   end
end


Live Your Life Not Some one Else's.| Sharing Is Caring

http://dsgaming.us/distrbd21/Distrbd21%20siggy.png

Cookie Jar

Suicide
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: [Tutorial]Add moving effects and bone a character
Next Topic: !afk command for lua
Goto Forum:
  


Current Time: Mon Nov 11 01:00:49 MST 2024

Total time taken to generate the page: 0.00956 seconds