10-06-2014, 04:40 AM
(This post was last modified: 10-06-2014, 04:42 AM by StevasaurousREX.)
(10-06-2014, 04:30 AM)xoft Wrote: If you're using any cMonster.mtXXX constants, rewrite them to mtXXX only, that should do the trick.
Not sure what you mean so ill show you my command,
function HandleSpawnMobCommand(Split, Player) -- Make sure there are a correct number of arguments. if ((#Split ~= 2) and (#Split ~=3)) then Player:SendMessage( Player, "Usage: /spawnmob <mobname> [number]" ) return true end -- Mob name as typed in by the player local MobName = Split[2] -- Mob Type based local MobType = StringToMobType(Split[2]) if Split[3] ~= nil then -- Don't allow more then 10 mobs to be spawned at once. local ammount = tonumber(Split[3]) if ammount > 10 then Player:SendMessage(Player, "Max mob spawn is 10.") ammount = 10 end for i=0,ammount do Player:GetWorld():SpawnMob(Player:GetPosX(), Player:GetPosY(), Player:GetPosZ(), MobType) end Player:SendMessage(Player, "Spawned " .. ammount .. " " .. MobName .. "s") return true else Player:GetWorld():SpawnMob(Player:GetPosX(), Player:GetPosY(), Player:GetPosZ(), MobType) Player:SendMessage(Player, "Spawned 1 " .. MobName) end return true; end