07-12-2013, 04:22 AM
I don't see anywhere what OtherPlayer is. Its just a nil value I think. I usely use something like this: I quickly created it so there could be some mistakes in it.
function ReturnMobIDFromString(Mob) if Mob == nil then return; end Mob = string.upper(Mob) elseif Mob == "CREEPER" then return 50 elseif Mob == "SKELETON" then return 52 elseif Mob == "SPIDER" then return 52 elseif Mob == "GIANT" then return 53 elseif Mob == "ZOMBIE" then return 52 -- ETC. end end Mob = ReturnMobIDFromString(Split[2]) if Mob == nil then Player:SendMessage("Mob not found") return true end if Split[3] ~= nil then cRoot:Get():ForEachPlayer( function(OtherPlayer) if OtherPlayer:GetName() == Split[3] then OtherPlayer:GetWorld():SpawnMob(Player:GetPosX(), Player:GetPosY(), Player:GetPosZ(), Mob) end) return true end Player:GetWorld():SpawnMob(Player:GetPosX(), Player:GetPosY(), Player:GetPosZ(), Mob)