Luccas
Members-
Posts
55 -
Joined
-
Last visited
About Luccas
- Birthday 04/11/2000
Details
-
Gang
iLuccasSCR
-
Location
Brasil
-
Interests
Scripter há 2 anos.
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
Luccas's Achievements
Snitch (10/54)
0
Reputation
-
Olá, queria saber qual a função que eu uso para fazer abaixar os vidros do carro igual quando ativa o realdriveby.
-
script crashando
Luccas replied to Luccas's topic in Ajudas relacionadas ao MTA:SA (Cliente/Servidor)
Sim. ele está dando erro na linha "local super=Classe("Grade",LuaObject,function() ". Mensagem de quando crasha: https://prntscr.com/pubyu4 -
Olá, esse script está crashando o mta de quem entra no servidor podem me ajudar ? local screenW, screenH = guiGetScreenSize() local resW, resH = 1360,768 local vzrx, vzry = (screenW/resW), (screenH/resH) local super = Class("Grid", LuaObject, function() static.font1 = dxCreateFont("utils/font.ttf", vzrx*10) static.font_10 = dxCreateFont("utils/font.ttf", vzrx*10) static.sx, static.sy = guiGetScreenSize() static.constructors = {} end).getSuperclass() local cursorOn; function Grid:init(x, y, w, h, postGUI) self.x = x self.y = y self.w = w self.h = h self.originalH = h self.columHeight = 30 self.itemHeight = 25 self.maxItems = self:getMaxPosition(); -- Max items self.pg = postGUI or false; self.items = {}; self.scrollTop = y + 18 + 2 self.listPos = 0; -- Scroll Level self.mo = nil; -- Mouse-on item self.visible = true -- Visible table.insert(Grid.constructors,self) return self end function Grid:destroy() for k, v in pairs(Grid) do if (v == self) then Grid[k] = nil end end return true end function Grid:setItemText(id, column, text) if self.items[column] and self.items[column][id] then self.items[column][id].text = text end end function Grid:setItemColor(id, column, r, g, b) if self.items[column] and self.items[column][id] then local color = tonumber(b) and tocolor(r, g, b) or tocolor(255, 255, 255) self.items[column][id].color = color end end function Grid:setVisible(visible) self.visible = visible end function Grid:isVisible() return self.visible end function Grid:addColumn(title, width) local data = { info = {title = title, width = width} }; table.insert (self.items, data); return #self.items; end function Grid:RemoveColumn(colum) self.items[colum] = nil; -- Recalculate the highest item count local highest = 0; for _, v in ipairs(self.items) do if #v > highest then highest =(#v - 1); end end return true end function Grid:getColumnCount() return #self.items end function Grid:addItem(colum, text, data, r, g, b) if self.items[colum] then local color = tonumber(b) and tocolor(r, g, b) or tocolor(255, 255, 255) table.insert(self.items[colum], {id = #self.items[colum] + 1, text = tostring(text), data = data, color = color}); self.h = self.columHeight + (self.maxItems*self.itemHeight) return #self.items[colum]; end end function Grid:removeItem( column, id) if self.items[column] and self.items[column][id] then -- Reset the selected item if necessary² if id == self.selected then local newItem = self.selected - 1 if newItem <= #self.items[colum] then self.selected = math.max(0, newItem); else self.selected = 0 end end table.remove(self.items[column], id); return true; end end function Grid:getItemCount(colum) if self.items[colum] then return #self.items[colum] end end function Grid:clear() for k, v in ipairs (self.items) do self.items[k] = {info = v.info} end self.selected = nil end function Grid:getSelectedItem() return self.selected; end function Grid:setSelectedItem (id) if id <= #self.items[1] then self.selected = id; end end function Grid:getItemDetails(column, id) if self.items[column] then if self.items[column][id] then return self.items[column][id].text, self.items[column][id].data end end end function paint() -- Is there any gridlist to render? if (#Grid.constructors > 0) then -- Loop through all grid lists for index, self in ipairs (Grid.constructors) do -- Is the gridlist visible? if self.visible then -- Draw the 'gridlist' itself dxDrawRectangle (self.x, self.y, self.w, self.h, tocolor(0, 0, 0, 0), self.pg); dxDrawRectangle(self.x, self.y + self.columHeight, self.w, self.h - self.columHeight, tocolor(0, 0, 0, 0), self.pg) -- Draw the column bar dxDrawRectangle(self.x, self.y, self.w, self.columHeight, tocolor(0, 0, 0, 0), self.pg) -- ScrollBar local uX, uY, uW = (self.x + self.w) + 1, self.y, 18 local b = 4 --UP Arow --[[ dxDrawRectangle(uX + 1, uY + 1, uW - 1, uW - 1, tocolor(0, 0, 0, 50), self.pg) dxDrawLine(uX + b , uY + uW - b, uX + uW/2, uY + b, tocolor(0, 0, 0, 70), 1, self.pg) dxDrawLine(uX - b + uW, uY + uW - b, uX + uW/2 , uY + b , tocolor(0, 0, 0, 70), 1, self.pg) --dxDrawLine(uX + b , uY + uW - b, uX + uW - b, uY + uW - b, tocolor(0, 0, 0, 70), 1, self.pg) ]] --DOWN Arow local dX, dY, dW, dH = (self.x + self.w) + 1, self.y + (self.h-18) + 1, 18 - 1, 18 - 1 --[[dxDrawRectangle(dX + 1, dY + 1, dW - 1, dW - 1, tocolor(0, 0, 0, 50), self.pg) dxDrawLine(dX + b , dH + dY - dW + b, dX + dW/2, dH + dY - b, tocolor(0, 0, 0, 70), 1, self.pg) dxDrawLine(dX + dW - b , dH + dY - dW + b, dX + dW/2, dH + dY - b, tocolor(0, 0, 0, 70), 1, self.pg) --dxDrawLine(dX + b , dH + dY - dW + b , dX + dW - b , dH + dY - dW + b, tocolor(0, 0, 0, 70), 1, self.pg) ]] --Thumb local x, y, w, h = (self.x + self.w) + 2, self.y + 18 + 2, 18 - 2, self.h - (18*2) - 2 --dxDrawRectangle(x, y, w, h, tocolor(0, 0, 0, 90)) local maxHeight = h self.thumbHeight = math.max(math.min(math.floor(maxHeight * self.maxItems / (#self.items[1])),maxHeight),18) local maxY = (y+h)-self.thumbHeight if (getKeyState("mouse1")) then if (isMouseInPosition(uX, uY, uW, uW)) then if (#self.items[1] > self.maxItems) then self.scrollTop = math.max(y,math.min(self.scrollTop - 1*maxHeight/100, maxY)) self.listPos = math.floor(((self.scrollTop - y) / (maxHeight-self.thumbHeight) * 100) * (#self.items[1]-self.maxItems) / 100) end elseif (isMouseInPosition(dX, dY, dW, dH)) then if (#self.items[1] > self.maxItems) then self.scrollTop = math.max(y,math.min(self.scrollTop + 1*maxHeight/100, maxY)) self.listPos = math.floor(((self.scrollTop - y) / (maxHeight-self.thumbHeight) * 100) * (#self.items[1]-self.maxItems) / 100) end end end if drag then local _, cy = getCursorPosition() local cy = cy*Grid.sy self.scrollTop = math.max(y,math.min(cy-space, maxY)) self.listPos = math.floor(((self.scrollTop - y) / (maxHeight-self.thumbHeight) * 100) * (#self.items[1]-self.maxItems) / 100) end local aa = 255 if (isMouseInPosition(x,self.scrollTop,w,self.thumbHeight)) then aa = 110 end -- Set cursorOn variable to the current gridlist, if it's selected self.cursorOn = nil if isMouseInPosition(self.x, self.y, self.w + 18, self.h) then cursorOn = index; end -- Is there any column? if #self.items > 0 then local cWidth = 0 -- Loop through all columns for cIndex, cData in ipairs(self.items) do -- we'll go beyond the gridlist width with this column ? if(( cWidth + cData.info.width) <= self.w) then local x = self.x + cWidth; -- Draw the column title dxDrawText(cData.info.title, x + 10, self.y, cData.info.width + x,(self.columHeight) + self.y, tocolor(255, 255, 255, 220), vzrx*1.4, "arial", "left", "center", true, true, self.pg, true, true); -- Is there any item ? if #cData > 0 then -- Loop the items local k = 0 for i=(self.listPos+1), (math.min(#self.items[1],self.maxItems)+self.listPos) do if cData[i] then -- Draw a rectangle to make it looks like selected dxDrawText(cData[i].text,x + 20,(self.columHeight + self.y)+(self.itemHeight*k),cData.info.width + x,(self.columHeight + self.y)+(self.itemHeight*k) + self.itemHeight, tocolor(255, 255, 255, 200), vzrx*1, Grid.font_10, "left", "center", true, true, self.pg, true, true) if (self.selected == i) then dxDrawRectangle(self.x,(self.columHeight + self.y)+(self.itemHeight*k),self.w,self.itemHeight,tocolor(255, 255, 255, 200), self.pg) dxDrawText(cData[i].text:gsub("#%x%x%x%x%x%x", ""),x + 20,(self.columHeight + self.y)+(self.itemHeight*k),cData.info.width + x,(self.columHeight + self.y)+(self.itemHeight*k) + self.itemHeight, tocolor(0, 0, 0, 220), vzrx*1, Grid.font_10, "left", "center", true, true, self.pg, true, true) end end k = k+1 end end -- Increase cWidth variable (to draw the columns correctly) cWidth = cWidth + cData.info.width; end end end end end end end addEventHandler("onClientRender", root, paint, true, "low-5") function onClientKey(key, press) if isCursorShowing() then if #Grid.constructors > 0 then if cursorOn then local self = Grid.constructors[cursorOn] if press and #key > 6 then if #self.items[1] > self.maxItems then local y = self.y + 18 + 2 local maxHeight = self.h - (18*2) - 2 if (isMouseInPosition(self.x,self.y,self.w+18,self.h)) then if (key == "mouse_wheel_down") then if (#self.items[1] > self.maxItems) then self.listPos = math.ceil(math.max(0,math.min(self.listPos + 1*#self.items[1]/100, #self.items[1]-self.maxItems))) self.scrollTop = y + ((self.listPos / (#self.items[1]-self.maxItems) * 100) * ((maxHeight)-self.thumbHeight) / 100) end elseif (key == "mouse_wheel_up") then if (#self.items[1] > self.maxItems) then self.listPos = math.floor(math.max(0,math.min(self.listPos - 1*#self.items[1]/100, #self.items[1]-self.maxItems))) self.scrollTop = y + ((self.listPos / (#self.items[1]-self.maxItems) * 100) * ((maxHeight)-self.thumbHeight) / 100) end end end end end end end end end addEventHandler("onClientKey", root, onClientKey) function onClientClick(button,state,absoluteX,absoluteY) if (button == "left" and state == "up") then drag = nil else if #Grid.constructors > 0 then if cursorOn then local self = Grid.constructors[cursorOn] local k = 0 for i=(self.listPos+1), (math.min(#self.items[1],self.maxItems)+self.listPos) do if isMouseInPosition(self.x,(self.columHeight + self.y)+(self.itemHeight*k),self.w,self.itemHeight) then self.selected = i end k = k+1 end if (#self.items[1] > self.maxItems) then local x, y, w, h = (self.x + self.w) + 2, self.y + 18 + 2, 18 - 2, self.h - (18*2) - 2 if (isMouseInPosition(x,self.scrollTop,w,self.thumbHeight)) then space = absoluteY-self.scrollTop drag = true elseif(isMouseInPosition((self.x + self.w) + 2,self.y + 18 + 2,18, self.h - (18*2) - 2)) then space = self.thumbHeight/2 drag = true end end end end end end addEventHandler("onClientClick",root,onClientClick) function Grid:getMaxPosition() local pos = 1 while true do if(pos*(24)+(24) <= self.originalH) then pos = pos + 1 else pos = pos - 2 break end end return pos end function isMouseInPosition(x, y, w, h) if (not isCursorShowing()) then return end local sx, sy = guiGetScreenSize ( ) local cx, cy = getCursorPosition ( ) local cx, cy = ( cx * sx ), ( cy * sy ) return ((cx >= x and cx <= x + w) and (cy >= y and cy <= y + h)) end --[[ local grid = Grid(400,150,500,500) local colum = grid:addColumn("Colum",200) for k=1, 80 do grid:addItem(colum,(tostring(k))) end showCursor(true)]]
-
Qual é o id pra deixar o carro mais rápido ?
-
Olá queria saber oque eu uso pra setar Rodas e Spoiler nos veículo.
-
Olá, quero colocar um dxDrawRectangle que vai carregando pro conforme o tempo do "setTimer" vai passando poderia me ajudar?
-
function MensagemTwitter(source, cmd, ...) local MessagemT = table.concat ( { ... }, "T" ) local name = getPlayerName(source); for _,v in ipairs(getElementsByType("player")) do conta = getAccountName ( getPlayerAccount ( source ) ) if isObjectInACLGroup ("user."..conta, aclGetGroup ( "Everyone" ) ) then outputChatBox("#00BFFF[ BsB™Twitter ] #FFFFFF "..name.." #FFFFFF: #00BFFF"..MessagemT,v, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Nome do grupo" ) ) then outputChatBox("#00BFFF[ BsB™Twitter ] #FFFFFF [Tag] "..name.." #FFFFFF: #00BFFF"..MessagemT,v, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Nome do grupo" ) ) then outputChatBox("#00BFFF[ BsB™Twitter ] #FFFFFF [Tag] "..name.." #FFFFFF: #00BFFF"..MessagemT,v, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Nome do grupo" ) ) then outputChatBox("#00BFFF[ BsB™Twitter ] #FFFFFF [Tag] "..name.." #FFFFFF: #00BFFF"..MessagemT,v, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Nome do grupo" ) ) then outputChatBox("#00BFFF[ BsB™Twitter ] #FFFFFF [Tag] "..name.." #FFFFFF: #00BFFF"..MessagemT,v, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Nome do grupo" ) ) then outputChatBox("#00BFFF[ BsB™Twitter ] #FFFFFF [Tag] "..name.." #FFFFFF: #00BFFF"..MessagemT,v, 255, 255, 255, true) end end end addCommandHandler("Twitter", MensagemTwitter) function MensagemAnon(source, cmd, ...) local MessagemANS = table.concat ( { ... }, "T" ); for _,v in ipairs(getElementsByType("player")) do conta = getAccountName ( getPlayerAccount ( source ) ) if isObjectInACLGroup ("user."..conta, aclGetGroup ( "Everyone" ) ) then outputChatBox("#00BFFF[ BsB™DeepWeb ] #FFFFFF "..name.." #FFFFFF: #00BFFF"..MessagemT,v, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Nome do grupo" ) ) then outputChatBox("#00BFFF[ BsB™DeepWeb ] #FFFFFF [Tag] "..name.." #FFFFFF: #00BFFF"..MessagemT,v, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Nome do grupo" ) ) then outputChatBox("#00BFFF[ BsB™DeepWeb ] #FFFFFF [Tag] "..name.." #FFFFFF: #00BFFF"..MessagemT,v, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Nome do grupo" ) ) then outputChatBox("#00BFFF[ BsB™DeepWeb ] #FFFFFF [Tag] "..name.." #FFFFFF: #00BFFF"..MessagemT,v, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Nome do grupo" ) ) then outputChatBox("#00BFFF[ BsB™DeepWeb ] #FFFFFF [Tag] "..name.." #FFFFFF: #00BFFF"..MessagemT,v, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Nome do grupo" ) ) then outputChatBox("#00BFFF[ BsB™DeepWeb ] #FFFFFF [Tag] "..name.." #FFFFFF: #00BFFF"..MessagemT,v, 255, 255, 255, true) end end end addCommandHandler("DeepWeb", MensagemAnon) function MensagemRP(source, cmd, ...) local MessagemFRP = table.concat ( { ... }, "" ); local name = getPlayerName(source); for _,v in ipairs(getElementsByType("player")) do conta = getAccountName ( getPlayerAccount ( source ) ) if isObjectInACLGroup ("user."..conta, aclGetGroup ( "Everyone" ) ) then outputChatBox("#00BFFF[ BsB™ForaDoRp ] #FFFFFF "..name.." #FFFFFF: #00BFFF"..MessagemT,v, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Nome do grupo" ) ) then outputChatBox("#00BFFF[ BsB™ForaDoRp ] #FFFFFF [Tag] "..name.." #FFFFFF: #00BFFF"..MessagemT,v, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Nome do grupo" ) ) then outputChatBox("#00BFFF[ BsB™ForaDoRp ] #FFFFFF [Tag] "..name.." #FFFFFF: #00BFFF"..MessagemT,v, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Nome do grupo" ) ) then outputChatBox("#00BFFF[ BsB™ForaDoRp ] #FFFFFF [Tag] "..name.." #FFFFFF: #00BFFF"..MessagemT,v, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Nome do grupo" ) ) then outputChatBox("#00BFFF[ BsB™ForaDoRp ] #FFFFFF [Tag] "..name.." #FFFFFF: #00BFFF"..MessagemT,v, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Nome do grupo" ) ) then outputChatBox("#00BFFF[ BsB™ForaDoRp ] #FFFFFF [Tag] "..name.." #FFFFFF: #00BFFF"..MessagemT,v, 255, 255, 255, true) end end end addCommandHandler("forarp", MensagemRP) addEventHandler("onPlayerJoin", getRootElement(), function() bindKey(source, "Y", "down", "chatbox", "Twitter") bindKey(source, "U", "down", "chatbox", "Deepweb") bindKey(source, "i", "down", "chatbox", "forarp") end ) OBS: Não testado. Qualquer erro só enviar print do "/debugscript 3". OBS: Só mudar a posição do "Nome do grupo" para o "Everyone". Pois quem tem a tag geral não vai aparecer a tag se ela estiver acima.
-
Desliga ele, ele que está mandando a mensagem.
-
O Gamemode "play" ou "freeroam" está ativado ?
-
@krazyY, Por favor me envie o server-side do script de chat para que eu possa ajuda-lo.
-
Olá, queria saber se tem algum código para fazer que a viatura das corporação no meu servidor não capotasse tão fácil. (Fiz um script que ele edita a velocidade mais não sei o nome pra não capotar) function loadHandling(v) if getElementModel(v) == 560 then setVehicleHandling(v, "mass", 1600) setVehicleHandling(v, "turnMass", 3000) setVehicleHandling(v, "dragCoeff", 1.8) setVehicleHandling(v, "centerOfMass", { 0, 0.15, -0.3 } ) setVehicleHandling(v, "percentSubmerged", 75) setVehicleHandling(v, "tractionMultiplier", 0.9) setVehicleHandling(v, "tractionLoss", 0.9) setVehicleHandling(v, "tractionBias", 0.497) setVehicleHandling(v, "numberOfGears", 5) setVehicleHandling(v, "maxVelocity", 211) setVehicleHandling(v, "engineAcceleration", 15) setVehicleHandling(v, "engineInertia", 50) setVehicleHandling(v, "driveType", "awd") setVehicleHandling(v, "engineType", "petrol") setVehicleHandling(v, "brakeDeceleration", 50) setVehicleHandling(v, "ABS", false) setVehicleHandling(v, "steeringLock", 35) setVehicleHandling(v, "headLight", 0) setVehicleHandling(v, "tailLight", 1) setVehicleHandling(v, "animGroup", 0) setVehicleHandling(v, "suspensionUpperLimit", 0.0) setVehicleHandling(v, "suspensionLowerLimit", -0.04) end
-
Não funcionou mano
-
Sim, mais o problema de não salvar nenhuma arma vai arrumar todas? Ou só da AK-47?
-
Não há erros.
-
function playerLogin (thePreviousAccount, theCurrentAccount, autoLogin) if not (isGuestAccount (getPlayerAccount (source))) then local accountData = getAccountData (theCurrentAccount, "funmodev2-money") if (accountData) then local playerMoney = getAccountData (theCurrentAccount, "funmodev2-money") local playerSkin = getAccountData (theCurrentAccount, "funmodev2-skin") local playerHealth = getAccountData (theCurrentAccount, "funmodev2-health") local playerArmor = getAccountData (theCurrentAccount, "funmodev2-armor") local playerX = getAccountData (theCurrentAccount, "funmodev2-x") local playerY = getAccountData (theCurrentAccount, "funmodev2-y") local playerZ = getAccountData (theCurrentAccount, "funmodev2-z") local playerInt = getAccountData (theCurrentAccount, "funmodev2-int") local playerDim = getAccountData (theCurrentAccount, "funmodev2-dim") local playerWanted = getAccountData (theCurrentAccount, "funmodev2-wantedlevel") local playerTeam = getAccountData (theCurrentAccount, "funmodev2-Team") local playerWeaponID0 = getAccountData (theCurrentAccount, "funmodev2-weaponID0") local playerWeaponID1 = getAccountData (theCurrentAccount, "funmodev2-weaponID1") local playerWeaponID2 = getAccountData (theCurrentAccount, "funmodev2-weaponID2") local playerWeaponID3 = getAccountData (theCurrentAccount, "funmodev2-weaponID3") local playerWeaponID4 = getAccountData (theCurrentAccount, "funmodev2-weaponID4") local playerWeaponID5 = getAccountData (theCurrentAccount, "funmodev2-weaponID5") local playerWeaponID6 = getAccountData (theCurrentAccount, "funmodev2-weaponID6") local playerWeaponID7 = getAccountData (theCurrentAccount, "funmodev2-weaponID7") local playerWeaponID8 = getAccountData (theCurrentAccount, "funmodev2-weaponID8") local playerWeaponID9 = getAccountData (theCurrentAccount, "funmodev2-weaponID9") local playerWeaponID10 = getAccountData (theCurrentAccount, "funmodev2-weaponID10") local playerWeaponID11 = getAccountData (theCurrentAccount, "funmodev2-weaponID11") local playerWeaponID12 = getAccountData (theCurrentAccount, "funmodev2-weaponID12") local playerWeaponAmmo0 = getAccountData (theCurrentAccount, "funmodev2-weaponAmmo0") local playerWeaponAmmo1 = getAccountData (theCurrentAccount, "funmodev2-weaponAmmo1") local playerWeaponAmmo2 = getAccountData (theCurrentAccount, "funmodev2-weaponAmmo2") local playerWeaponAmmo3 = getAccountData (theCurrentAccount, "funmodev2-weaponAmmo3") local playerWeaponAmmo4 = getAccountData (theCurrentAccount, "funmodev2-weaponAmmo4") local playerWeaponAmmo5 = getAccountData (theCurrentAccount, "funmodev2-weaponAmmo5") local playerWeaponAmmo6 = getAccountData (theCurrentAccount, "funmodev2-weaponAmmo6") local playerWeaponAmmo7 = getAccountData (theCurrentAccount, "funmodev2-weaponAmmo7") local playerWeaponAmmo8 = getAccountData (theCurrentAccount, "funmodev2-weaponAmmo8") local playerWeaponAmmo9 = getAccountData (theCurrentAccount, "funmodev2-weaponAmmo9") local playerWeaponAmmo10 = getAccountData (theCurrentAccount, "funmodev2-weaponAmmo10") local playerWeaponAmmo11 = getAccountData (theCurrentAccount, "funmodev2-weaponAmmo11") local playerWeaponAmmo12 = getAccountData (theCurrentAccount, "funmodev2-weaponAmmo12") spawnPlayer (source, playerX, playerY, playerZ +1, 0, playerSkin, playerInt, playerDim) setPlayerMoney (source, playerMoney) setTimer (setElementHealth, 500, 1, source, playerHealth) setTimer (setPedArmor, 500, 1, source, playerArmor) setTimer (setPlayerWantedLevel, 500, 1, source, playerWanted) giveWeapon(source, playerWeaponID0, playerWeaponAmmo0, true) giveWeapon(source, playerWeaponID1, playerWeaponAmmo1, false) giveWeapon(source, playerWeaponID2, playerWeaponAmmo2, false) giveWeapon(source, playerWeaponID3, playerWeaponAmmo3, false) giveWeapon(source, playerWeaponID4, playerWeaponAmmo4, false) giveWeapon(source, playerWeaponID5, playerWeaponAmmo5, false) giveWeapon(source, playerWeaponID6, playerWeaponAmmo6, false) giveWeapon(source, playerWeaponID7, playerWeaponAmmo7, false) giveWeapon(source, playerWeaponID8, playerWeaponAmmo8, false) giveWeapon(source, playerWeaponID9, playerWeaponAmmo9, false) giveWeapon(source, playerWeaponID10, playerWeaponAmmo10, false) giveWeapon(source, playerWeaponID11, playerWeaponAmmo11, false) giveWeapon(source, playerWeaponID12, playerWeaponAmmo12, false) setCameraTarget (source, source) fadeCamera(source, true, 2.0) else spawnPlayer (source, 1481.0855712891, -1771.2996826172, 18.795753479004, 0,78, 0, 0) setPlayerMoney (source, 200) setCameraTarget (source, source) fadeCamera(source, true, 2.0) end end end addEventHandler ("onPlayerLogin", getRootElement(), playerLogin) function onLogout () kickPlayer (source, nil, "Logging out is disallowed.") end addEventHandler ("onPlayerLogout", getRootElement(), onLogout) function onQuit (quitType, reason, responsibleElement) if not (isGuestAccount (getPlayerAccount (source))) then account = getPlayerAccount (source) if (account) then local x,y,z = getElementPosition (source) setAccountData (account, "funmodev2-money", tostring (getPlayerMoney (source))) setAccountData (account, "funmodev2-skin", tostring (getPedSkin (source))) setAccountData (account, "funmodev2-health", tostring (getElementHealth (source))) setAccountData (account, "funmodev2-armor", tostring (getPedArmor (source))) setAccountData (account, "funmodev2-R", r) setAccountData (account, "funmodev2-G", g) setAccountData (account, "funmodev2-B", b) setAccountData (account, "funmodev2-x", x) setAccountData (account, "funmodev2-y", y) setAccountData (account, "funmodev2-z", z) setAccountData (account, "funmodev2-int", getElementInterior (source)) setAccountData (account, "funmodev2-dim", getElementDimension (source)) setAccountData (account, "funmodev2-wantedlevel", getPlayerWantedLevel (source)) setAccountData (account, "funmodev2-weaponID0", getPedWeapon (source, 0)) setAccountData (account, "funmodev2-weaponID1", getPedWeapon (source, 1)) setAccountData (account, "funmodev2-weaponID2", getPedWeapon (source, 2)) setAccountData (account, "funmodev2-weaponID3", getPedWeapon (source, 3)) setAccountData (account, "funmodev2-weaponID4", getPedWeapon (source, 4)) setAccountData (account, "funmodev2-weaponID5", getPedWeapon (source, 5)) setAccountData (account, "funmodev2-weaponID6", getPedWeapon (source, 6)) setAccountData (account, "funmodev2-weaponID7", getPedWeapon (source, 7)) setAccountData (account, "funmodev2-weaponID8", getPedWeapon (source, 8)) setAccountData (account, "funmodev2-weaponID9", getPedWeapon (source, 9)) setAccountData (account, "funmodev2-weaponID10", getPedWeapon (source, 10)) setAccountData (account, "funmodev2-weaponID11", getPedWeapon (source, 11)) setAccountData (account, "funmodev2-weaponID12", getPedWeapon (source, 12)) setAccountData (account, "funmodev2-weaponAmmo0", getPedTotalAmmo (source, 0)) setAccountData (account, "funmodev2-weaponAmmo1", getPedTotalAmmo (source, 1)) setAccountData (account, "funmodev2-weaponAmmo2", getPedTotalAmmo (source, 2)) setAccountData (account, "funmodev2-weaponAmmo3", getPedTotalAmmo (source, 3)) setAccountData (account, "funmodev2-weaponAmmo4", getPedTotalAmmo (source, 4)) setAccountData (account, "funmodev2-weaponAmmo5", getPedTotalAmmo (source, 5)) setAccountData (account, "funmodev2-weaponAmmo6", getPedTotalAmmo (source, 6)) setAccountData (account, "funmodev2-weaponAmmo7", getPedTotalAmmo (source, 7)) setAccountData (account, "funmodev2-weaponAmmo8", getPedTotalAmmo (source, 8)) setAccountData (account, "funmodev2-weaponAmmo9", getPedTotalAmmo (source, 9)) setAccountData (account, "funmodev2-weaponAmmo10", getPedTotalAmmo (source, 10)) setAccountData (account, "funmodev2-weaponAmmo11", getPedTotalAmmo (source, 11)) setAccountData (account, "funmodev2-weaponAmmo12", getPedTotalAmmo (source, 12)) end end end addEventHandler ("onPlayerQuit", getRootElement(), onQuit) function onWasted(totalAmmo, killer, killerWeapon, bodypart, stealth) if not( isGuestAccount (getPlayerAccount(source)) ) then local theWeapon = getPedWeapon (source) local weaponAmmo = getPedTotalAmmo (source) fadeCamera (source, false) setTimer (spawnPlayer, 1000, 1, source, 2036.1735839844, -1413.0563964844, 16.9921875, 0, getPedSkin (source), 0, 0, getPlayerTeam(source)) setTimer (setCameraTarget, 1250, 1, source, source) setTimer (fadeCamera, 2000, 1, source, true) setTimer (giveWeapon, 2000, 1, source, theWeapon, weaponAmmo, true) end end addEventHandler ("onPlayerWasted", getRootElement(), onWasted) --- function setTeam() local account = getPlayerAccount(source) -- gets players account local team = getAccountData (account, "team") -- gets players team if (team) and getTeamFromName(team) then setPlayerTeam(source, getTeamFromName(team)) -- sets players team end end addEventHandler("onPlayerLogin",root,setTeam) -- sets players team on login function save() local team = getPlayerTeam(source) -- Gets the players team local account = getPlayerAccount(source) if (team) and not isGuestAccount(account) then -- Checks to see if the player is a guest or not setAccountData(account, "team", getTeamName(team)) --saves team end end addEventHandler("onPlayerQuit", getRootElement(), save) -- saves team on quit @Lord Henry