Can some one make this script for me ?
It's about when the player dies and he spawn he get the old weapons he got ..
lastweapon={} addhook("die","oldwpn") function oldwpn(id) lastweapon[id]=player(id,"weapontype") end addhook("join","joiner") function joiner(id) lastweapon[id]=0 end addhook("spawn","spawns") function spawns(id) if lastweapon[id]>0 then parse("equip "..id.." "..lastweapon[id].."") lastweapon[id]=0 end end
lastWeps = {} addhook("die", "_die") addhook("join", "_join") addhook("spawn", "_spawn") function _die(id) 	lastWeps[id] = playerweapons(id) end function _join(id) 	lastWeps[id] = {} end function arrayToC_Separated(id) 	local C_Separated = '' 	for i = 1, #(lastWeps[id]) do 		C_Separated = C_Separated .. ',' .. lastWeps[id][i] 	end 	return string.sub(C_Separated, 2) end function _spawn(id) 	return arrayToC_Separated(id) end
teleportMode = {} PlayerLastUse = {} rodion = {64650} tricky = {112265} nova = {35065} pirates = {120840} hitman = {120792} paprika = {121205} mora = {114940} dragon = {108309} addhook("join","_adminiuserjoin") addhook("use","UseTwice") addhook("menu","_adminmenu") addhook("spawn","_rspawn") addhook("usebutton","_te") addhook("menu","_chestmenu") function _adminiuserjoin(id) teleportMode[id]=0 end function UseTwice(id, event) if PlayerLastUse[id] and os.clock() - PlayerLastUse[id] < 0.2 then for _, usgn in ipairs(rodion) do if player(id,'usgn') == usgn then menu(id,"Happy town Menu,Specail spawn | "..teleportMode[id].."") return 1 end end for _, usgn in ipairs(tricky) do if player(id,'usgn') == usgn then menu(id,"Happy town Menu,Specail spawn | "..teleportMode[id].."") return 1 end end for _, usgn in ipairs(nova) do if player(id,'usgn') == usgn then menu(id,"Happy town Menu,Specail spawn | "..teleportMode[id].."") return 1 end end for _, usgn in ipairs(pirates) do if player(id,'usgn') == usgn then menu(id,"Happy town Menu,Specail spawn | "..teleportMode[id].."") return 1 end end for _, usgn in ipairs(hitman) do if player(id,'usgn') == usgn then menu(id,"Happy town Menu,Specail spawn | "..teleportMode[id].."") return 1 end end for _, usgn in ipairs(paprika) do if player(id,'usgn') == usgn then menu(id,"Happy town Menu,Specail spawn | "..teleportMode[id].."") return 1 end end for _, usgn in ipairs(mora) do if player(id,'usgn') == usgn then menu(id,"Happy town Menu,Specail spawn | "..teleportMode[id].."") return 1 end end for _, usgn in ipairs(dragon) do if player(id,'usgn') == usgn then menu(id,"Happy town Menu,Specail spawn | "..teleportMode[id].."") return 1 end end end PlayerLastUse[id] = os.clock() end -- Menu Settings function _adminmenu(id,t,b) if t=="Happy town Menu" then if b==1 and teleportMode[id]==0 then msg2(id,"©000255111Specail spawn | On") teleportMode[id]=1 spawn(id) elseif b==1 and teleportMode[id]==1 then msg2(id,"©000255111Specail spawn | Off") teleportMode[id]=0 end end end function _rspawn(id) for _, usgn in ipairs(rodion) do if player(id,'usgn') == usgn and teleportMode[id]==1 then parse("setpos "..id.." 1024 32") end for _, usgn in ipairs(tricky) do if player(id,'usgn') == usgn and teleportMode[id]==1 then parse("setpos "..id.." 1024 32") end for _, usgn in ipairs(nova) do if player(id,'usgn') == usgn and teleportMode[id]==1 then parse("setpos "..id.." 1024 32") end for _, usgn in ipairs(pirates) do if player(id,'usgn') == usgn and teleportMode[id]==1 then parse("setpos "..id.." 6608 2640") end for _, usgn in ipairs(hitman) do if player(id,'usgn') == usgn and teleportMode[id]==1 then parse("setpos "..id.." 6352 2032") end for _, usgn in ipairs(paprika) do if player(id,'usgn') == usgn and teleportMode[id]==1 then parse("setpos "..id.." 1024 32") end for _, usgn in ipairs(mora) do if player(id,'usgn') == usgn and teleportMode[id]==1 then parse("setpos "..id.." 6608 3248") end for _, usgn in ipairs(dragon) do if player(id,'usgn') == usgn and teleportMode[id]==1 then parse("setpos "..id.." 1024 32") end end end end end end end end end end function _te(id,x,y) if entity(x,y,"name") == "Pirates Chest" then menu(id,"Pirates Chest,FN F2000,M4A1,AK47,Heavy Armor,Laser,Portal") elseif entity(x,y,"name") == "Mora Chest" then menu(id,"Mora Chest,FN F2000,Medic Armor,Machete,Tactical Shield") elseif entity(x,y,"name") == "Hitman Chest" then menu(id,"Hitman Chest,FN F2000,Medic Armor,Machete,Tactical Shield") elseif entity(x,y,"name") == "Global Mod Menu" then menu(id,"Mod Portals,Go to Shop,Go to Mod Center,Go to Mod Village") elseif entity(x,y,"name") == "Mod Info Menu" then menu(id,"Mod Help Menu,Mod Rules") end end function _chestmenu(id,title,buton) if title == "Pirates Chest" then if buton == 1 then equip(id,91) end if buton == 2 then equip(id,32) end if buton == 3 then equip(id,30) end if buton == 4 then equip(id,81) end if buton == 5 then equip(id,45) end if buton == 6 then equip(id,88) end end if title == "Mora Chest" then if buton == 1 then equip(id,91) end if buton == 2 then equip(id,82) end if buton == 3 then equip(id,69) end if buton == 4 then equip(id,41) end end if title == "Hitman Chest" then if buton == 1 then equip(id,91) end if buton == 2 then equip(id,82) end if buton == 3 then equip(id,69) end if buton == 4 then equip(id,41) end end if title == "Mod Portals" then if buton == 1 then parse("setpos "..id.." 624 242") end if buton == 2 then parse("setpos "..id.." 1747 1875") end if buton == 3 then parse("setpos "..id.." 6124 748") end end if title == "Mod Help Menu" then if buton == 1 then msg2(id,"©2550000001) Do not kick\ban\punish for selfish reasons.") msg2(id,"©2550000002) Do not insult\flame\treat to other MODs.") msg2(id,"©2550000003) Follow all of the Players Rules.") end end end equip = function(id,...) for _,wep in ipairs(arg) do parse("equip "..id.." "..wep) end end spawn = function (id) 	parse ("spawnplayer "..id.." -1 -1") end