10-06-2014, 04:30 AM
If you're using any cMonster.mtXXX constants, rewrite them to mtXXX only, that should do the trick.
|
Essentials for MCServer (2)
|
|
10-06-2014, 04:30 AM
If you're using any cMonster.mtXXX constants, rewrite them to mtXXX only, that should do the trick.
10-06-2014, 04:38 AM
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
10-06-2014, 05:54 AM
Right, it's a problem in the server, then. The StringToMobType function, to be more specific. I'll fix that momentarily.
Fix committed. You should change your StringToMobType() to cMonster:StringToMobType(); it will continue working for now but will emit a log message about being deprecated.
Thanks given by: tonibm19
10-06-2014, 10:02 AM
Weird problem but it is only spawning pigs..
10-07-2014, 05:36 AM
Stage 1 of pig takeover.
|
|
« Next Oldest | Next Newest »
|