--Written by RoShambo, Wittebolx, and halo2pac --Remove credits and you will die! --Sample plugin for you, for the commands !build tower and !build turret --VB style language, very easy to learn! function printf(...) io.write(string.format(unpack(arg))) end function InputConsole(...) Console_Input(string.format(unpack(arg))) end Object = 0 function OnChat(pID, Type, Message) if Message == "!weapon ramjet" then local pos = Get_Position(Get_GameObj(pID)) Grant_Powerup(Get_GameObj(pID), "POW_RamjetRifle_Player") Grant_Powerup(Get_GameObj(pID), "CnC_POW_Ammo_ClipMax") InputConsole("ppage %d Ramjet Rifle Granted!", pID) end end end if Message == "!weapon shotgun" then local pos = Get_Position(Get_GameObj(pID)) Grant_Powerup(Get_GameObj(pID), "POW_Shotgun_Player") Grant_Powerup(Get_GameObj(pID), "CnC_POW_Ammo_ClipMax") InputConsole("ppage %d Shotgun granted!", pID) end end end if Message == "!weapon repairgun" then local pos = Get_Position(Get_GameObj(pID)) Grant_Powerup(Get_GameObj(pID), "CnC_POW_RepairGun_Player") Grant_Powerup(Get_GameObj(pID), "CnC_POW_Ammo_ClipMax") InputConsole("ppage %d RepairGun Granted!", pID) end end end if Message == "!weapon flamethrower" then local pos = Get_Position(Get_GameObj(pID)) Grant_Powerup(Get_GameObj(pID), "POW_Flamethrower_Player") Grant_Powerup(Get_GameObj(pID), "CnC_POW_Ammo_ClipMax") InputConsole("ppage %d Flamethrower Granted!", pID) end end end if Message == "!weapon grenade launcher" then local pos = Get_Position(Get_GameObj(pID)) Grant_Powerup(Get_GameObj(pID), "POW_GrenadeLauncher_Player") Grant_Powerup(Get_GameObj(pID), "CnC_POW_Ammo_ClipMax") InputConsole("ppage %d Grenade Launcher Granted!", pID) end end end if Message == "!weapon chaingun" then local pos = Get_Position(Get_GameObj(pID)) Grant_Powerup(Get_GameObj(pID), "POW_Chaingun_Player") Grant_Powerup(Get_GameObj(pID), "CnC_POW_Ammo_ClipMax") InputConsole("ppage %d GDI Chaingun granted!", pID) end end end if Message == "!weapon chemsprayer" then local pos = Get_Position(Get_GameObj(pID)) Grant_Powerup(Get_GameObj(pID), "POW_ChemSprayer_Player") Grant_Powerup(Get_GameObj(pID), "CnC_POW_Ammo_ClipMax") InputConsole("ppage %d Chemsprayer granted!", pID) end end end if Message == "!weapon tiberium auto rifle" then local pos = Get_Position(Get_GameObj(pID)) Grant_Powerup(Get_GameObj(pID), "POW_TiberiumAutoRifle_Player") Grant_Powerup(Get_GameObj(pID), "CnC_POW_Ammo_ClipMax") InputConsole("ppage %d Tiberium Auto Rifle Granted!", pID) end end end if Message == "!weapon laser chaingun" then local pos = Get_Position(Get_GameObj(pID)) Grant_Powerup(Get_GameObj(pID), "POW_LaserChaingun_Player") Grant_Powerup(Get_GameObj(pID), "CnC_POW_Ammo_ClipMax") InputConsole("ppage %d Laser Chaingun granted!", pID) end end end if Message == "!weapon laser rifle" then local pos = Get_Position(Get_GameObj(pID)) Grant_Powerup(Get_GameObj(pID), "POW_LaserRifle_Player") Grant_Powerup(Get_GameObj(pID), "CnC_POW_Ammo_ClipMax") InputConsole("ppage %d Laser Rifle Granted!", pID) end end end if Message == "!weapon rocket launcher" then local pos = Get_Position(Get_GameObj(pID)) Grant_Powerup(Get_GameObj(pID), "POW_RocketLauncher_Player") Grant_Powerup(Get_GameObj(pID), "CnC_POW_Ammo_ClipMax") InputConsole("ppage %d Rocket Launcher Granted!", pID) end end end if Message == "!weapon tiberium flechette gun" then local pos = Get_Position(Get_GameObj(pID)) Grant_Powerup(Get_GameObj(pID), "POW_TiberiumFlechetteGun_Player") Grant_Powerup(Get_GameObj(pID), "CnC_POW_Ammo_ClipMax") InputConsole("ppage %d Flechette_Gun Granted!", pID) end end end if Message == "!weapon PIC" then local pos = Get_Position(Get_GameObj(pID)) Grant_Powerup(Get_GameObj(pID), "POW_PersonalIonCannon_Player") Grant_Powerup(Get_GameObj(pID), "CnC_POW_Ammo_ClipMax") InputConsole("ppage %d Personnel Ion Cannon Granted!", pID) end end end if Message == "!weapon railgun" 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("ppage %d Railgun Granted!", pID) end end end if Message == "!weapon volt auto rifle" then local pos = Get_Position(Get_GameObj(pID)) Grant_Powerup(Get_GameObj(pID), "POW_VoltAutoRifle_Player") Grant_Powerup(Get_GameObj(pID), "CnC_POW_Ammo_ClipMax") InputConsole("ppage %d Volt Auto Rifle Granted!", pID) end end end if Message == "!weapon sniper rifle" then local pos = Get_Position(Get_GameObj(pID)) Grant_Powerup(Get_GameObj(pID), "POW_SniperRifle_Player") Grant_Powerup(Get_GameObj(pID), "CnC_POW_Ammo_ClipMax") InputConsole("ppage %d Sniper Rifle Granted!", pID) end end end if Message == "!weapon proximity mines" then if Purchase_Item(Get_GameObj(pID), 250) == 1 then local pos = Get_Position(Get_GameObj(pID)) Grant_Powerup(Get_GameObj(pID), "CnC_MineProximity_05") Grant_Powerup(Get_GameObj(pID), "CnC_POW_Ammo_ClipMax") InputConsole("ppage %d Proximity Mines granted!", pID) end end end if Message == "!weapon time c4" then local pos = Get_Position(Get_GameObj(pID)) Grant_Powerup(Get_GameObj(pID), "CnC_POW_MineTimed_Player_02") Grant_Powerup(Get_GameObj(pID), "CnC_POW_Ammo_ClipMax") InputConsole("ppage %d Time C4 Granted!", pID) end end end if Message == "!weapon remote c4" then local pos = Get_Position(Get_GameObj(pID)) Grant_Powerup(Get_GameObj(pID), "CnC_POW_MineRemote_02") Grant_Powerup(Get_GameObj(pID), "CnC_POW_Ammo_ClipMax") InputConsole("ppage %d Remote c4 Granted!", pID) end end end end function OnPlayerJoin(pID, Nick) end function OnPlayerLeave(pID) end function OnHostMessage(ID, Type, Message) end function OnLevelLoaded() end function OnLevelEnded() end function OnConsoleOutput(Message) end function OnDDERecived(Message) end function OnObjectCreate(Object) end