Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function GameMode:OnPlayerChat(keys)
- local teamonly = keys.teamonly
- local userID = keys.userid
- local playerID = self.vUserIds[userID]:GetPlayerID()
- local text = keys.text
- if self.firstLoad[playerID] == nil then
- self.firstLoad[playerID] = 1
- end
- print(self.firstLoad[playerID])
- if(text == "load")then
- if self.firstLoad[playerID] == 1 then
- self.firstLoad[playerID] = 2
- local hero = CreateHeroForPlayer("npc_dota_hero_axe", PlayerResource:GetPlayer(self.vUserIds[userID]:GetPlayerID()) )
- hero:SetControllableByPlayer(playerID, true)
- item1=CreateItem("item_blink", hero, hero)
- item1:SetPurchaseTime(0)
- hero:AddItem(item1)
- else
- Say(self, "You can't load more than once per game!", true)
- end
- end
- return text
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement