pepsi18
Members-
Posts
49 -
Joined
-
Last visited
-
Days Won
1
Everything posted by pepsi18
-
is possible ban a player with a particular account when it login
-
as I can do to the two spawn are on the same team the problem is that it only works one and when spawnean on the other not joins the team "Las venturas" > "Anti Z" friendlyfire="false" > "El equipo anti zombies de las vegas sige en busca de sobrevivientes unete a su busqueda." /> "93" green="134" blue="240" /> "coop" id="285" > "2294.82" y="2450.75" z="10.82" rot="91.98" /> "FBI" id="163" > "2294.82" y="2450.75" z="10.82" rot="91.98" /> "Police" id="283" > "2294.82" y="2450.75" z="10.82" rot="91.98" /> "3" ammo="1" /> "23" ammo="1000" /> "25" ammo="1000" /> "31" ammo="1000" /> "17" ammo="3" /> "2213.82" y="2391.22" z="18.86" /> "2240.29" y="2422.73" z="13.44" /> "San fierro" > "Anti Z" friendlyfire="false" > "El equipo anti zombies de las san fierro sige en busca de sobrevivientes unete a su busqueda." /> "93" green="134" blue="240" /> "coop" id="285" > "-1617.6384277344" y="678.08349609375" z="-4.90625" rot="265.76" /> "3" ammo="1" /> "23" ammo="1000" /> "25" ammo="1000" /> "31" ammo="1000" /> "17" ammo="3" /> "-1537.5603027344" y="679.78375244141" z="21.113416671753" /> "-1617.6384277344" y="678.08349609375" z="-4.90625" />
-
what is the problem me the script does not work addCommandHandler ( "money", function ( player, _, who, clan ) local playerWho = findPlayerByName( who ) if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)),aclGetGroup("Admin")) then if ( playerWho ) then local money = tonumber ( money ) if ( money ) then takePlayerMoney ( playerwho, tostring ( money - 0) ) outputChatBox ("Tu dinero disminuyo en ", playerWho, 255, 255, 255, true) end end end end ) function findPlayerByName (name) local player = getPlayerFromName(name) if player then return player end for i, player in ipairs(getElementsByType("player")) do if string.find(string.gsub(getPlayerName(player):lower(),"#%x%x%x%x%x%x", ""), name:lower(), 1, true) then return player end end return false end
-
mmm now ? addEventHandler("onClientVehicleEnter",root,function() if getElementModel(source) == 411 then for index,Object in ipairs(getElementsByType("Object")) do setElementCollidableWith(source, Object, false); end; end; end);
-
While this will be ? addEventHandler("onVehicleEnter",root,function() if getElementModel(source) == 411 then for index,Object in ipairs(getElementsByType("Object")) do setElementCollidableWith(source, Object, false); end; end; end);
-
is possible a vehicle not collide with objects and players
-
help as I can make the infernus overstep the objects function vehicle(thevehicle) local id = getElementModel ( theVehicle ) if id == 411 then getElementCollisionsEnabled ( theVehicle,false ) end end addEventHandler ( "onPlayerVehicleEnter", getRootElement(), vehicle )
-
mm ya lo hice borre ese anim pero igual los zombies te matan cuando estan detras tuyo y es muy molesto por que parece que mueres de la nada
-
alguien me dice que parte del scrip de zombies debo editar para que no maten a los jugadores por atras cortandole el cuello xfa alguien que me ayude
-
I am using this radar community as might make the map does not repeat at the end of the entire map help plis local s = {guiGetScreenSize()} local icons = {} for k = 1,65 do icons[k] = dxCreateTexture("blips/"..k..".png") end local blips = {} addEventHandler( "onClientResourceStart", getRootElement( ),function (res) if res ~= getThisResource() then return end radarTexture = dxCreateTexture("sattelite.png", 'dxt5', true, 'clamp' ) currentZoomState = 0.8 local width, height = 1200,1200 radar = dxCreateRenderTarget( s[1]*width*3/1440, s[2]*height*3/900 ) mapRadar = dxCreateRenderTarget( s[1]*width*3/1440, s[2]*height*3/900,true ) radararea = dxCreateRenderTarget( s[1]*width*3/1440, s[2]*height*3/900,true ) pathmap = dxCreateRenderTarget( s[1]*width*3/1440, s[2]*height*3/900,true ) local MimgW,MimgH = dxGetMaterialSize(mapRadar) setTimer(function () blips = {} for i, v in ipairs( getElementsByType('blip') ) do local icon = getBlipIcon(v) if icon > 3 then local px,py = getElementPosition(v) local blip_x = (3000+px)/6000*MimgW local blip_y = (3000-py)/6000*MimgH local rot = getPedCameraRotation( localPlayer ) table.insert(blips,{x = blip_x, y = blip_y,icon = icon}) end end end,10000,0) addEventHandler ("onClientPreRender",root, function () dxSetRenderTarget( mapRadar,true ) dxDrawImage (0,0,MimgW,MimgH, radarTexture) for i, v in ipairs( blips ) do local rot = getPedCameraRotation( localPlayer ) dxDrawImage(v.x-20/2, v.y-20/2, 20, 20,icons[v.icon],rot) end for i, v in ipairs(getElementsByType('player') ) do if v ~= localPlayer then local r,g,b = 20,200,20 or getPlayerNametagColor(v) local px,py = getElementPosition(v) local p_x = (3000+px)/6000*MimgW local p_y = (3000-py)/6000*MimgH local prot = getPedRotation( v ) local p_blipsize = 20-currentZoomState dxDrawImage (p_x-p_blipsize/2,p_y-p_blipsize/2,p_blipsize,p_blipsize, icons[3],-prot,0,0,tocolor(r,g,b)) end end dxSetRenderTarget( ) dxSetRenderTarget( radararea,true ) for i, v in ipairs( getElementsByType('radararea') ) do local r,g,b,a = getRadarAreaColor(v) local w,h = getRadarAreaSize(v) x,y = getElementPosition(v) x = x / (6000 / MimgW) + MimgW/2 y = y / (-6000/ MimgH) + MimgH/2 dxDrawRectangle(x, (y-h) + 4 + (h/2), (w/2), (h/2), tocolor(r,g,b,a)) end dxSetRenderTarget( ) dxSetRenderTarget( radar,true ) local x,y,z = getElementPosition(localPlayer) local rot = getPedCameraRotation( localPlayer ) local mapx = x / (6000/MimgW) + MimgW/2 - width*currentZoomState/2 local mapy = y / (-6000/MimgH) + MimgH/2 - height*currentZoomState/2 dxDrawImageSection (0,0,width,height,mapx,mapy,width*currentZoomState,height*currentZoomState,mapRadar,-rot) dxDrawImageSection (0,0,width,height,mapx,mapy,width*currentZoomState,height*currentZoomState,radararea,-rot) dxDrawImageSection (0,0,width,height,mapx,mapy,width*currentZoomState,height*currentZoomState,pathmap,-rot) local px,py = getElementPosition(localPlayer) local prot = getPedRotation( localPlayer ) local pblipsize = 20 - currentZoomState dxDrawImage (width/2-pblipsize/2,height/2-pblipsize/2,pblipsize,pblipsize, icons[3],-rot-prot) dxSetRenderTarget() showPlayerHudComponent("radar",false) dxDrawImageSection(s[1]*50/1440, s[2]*650/900, s[1]*300/1440, s[2]*200/900, 450,490, 300, 200,radar, 0, -90, 0, tocolor(255, 255, 255, 255),true) dxDrawRectangle(s[1]*50/1440, s[2]*650/900,s[1]*300/1440,s[2]*2/900,tocolor(0,0,0,255),true) dxDrawRectangle(s[1]*50/1440, s[2]*850/900,s[1]*300/1440,s[2]*2/900,tocolor(0,0,0,255),true) dxDrawRectangle(s[1]*350/1440, s[2]*650/900,s[1]*2/1440,s[2]*202/900,tocolor(0,0,0,255),true) dxDrawRectangle(s[1]*50/1440, s[2]*650/900,s[1]*2/1440,s[2]*200/900,tocolor(0,0,0,255),true) local x,y,z = getElementPosition(localPlayer) local zone = getZoneName(x,y,z) local textwidth = dxGetTextWidth(zone, 1.02,"default-bold") dxDrawRectangle(s[1]*50/1440, s[2]*820/900,s[1]*(textwidth+25)/1440,s[2]*30/900,tocolor(0,0,0,120),true) dxDrawText ( zone, s[1]*63/1440, s[2]*828/900,s[1]*(textwidth+25)/1440,s[2]*30/900, tocolor ( 255, 255, 255, 255 ), 1.02, "default-bold", "left", "top",false,false,true,false,true, 0,0,0) if getKeyState("num_add") then if currentZoomState - 0.01 < 0.5 then return else currentZoomState = currentZoomState - 0.03 end elseif getKeyState("num_sub") then if currentZoomState + 0.01 > 1.5 then return else currentZoomState = currentZoomState + 0.03 end end end ) end)
-
hola a todos quisiera saber que parte del dxscoreboard_client debo editar para que este activado el scroll del mouse sin tener que aser click derecho alguien que me ayude porfis D:
-
Tengo una duda estoy editando u n scoreboard cambiandole los colores y el tipo de letra todo queda bien el problema que tengo es que cuando salgo de mi servidor y entro en otro servidor al regresar a mi servidor los cambios de mi scoreboard se fueron y mi scoreboard quedo como el scoreboard del server al que acaba de entrar nose por que alguien me resuelve esa duda xfa
-
what is the problem works well but after a while it stops working and I must restart the scrip
-
seria bueno si se ubiera un metodo de pago por wester union
-
ERROR: join/login.lua:5: attempt to concatenate local ´country´ what its the problem function login() local country = call(getResourceFromName("admin"), "getPlayerCountry", source) if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Everyone")) then outputChatBox("* " .. getPlayerName(source) .. " #a5d9f2^(" .. getAccountName(getPlayerAccount(source)) .. ") #ffffff Se a conectado . ["..country.."]" , getRootElement(), 255,255,255, true) end end addEventHandler("onPlayerLogin", getRootElement(), login)
-
help not open the chat window which is the problem : ( the chat is opened but when I give click the player does not open window chat g_LocalPlayer = getLocalPlayer() g_Root = getRootElement() g_ThisResource = getThisResource() g_ResourceRoot = getResourceRootElement(getThisResource()) chat = {} -- table to store chat windows in newmsg = {show=false, tick=getTickCount(), showtime=5000, img=nil, lbl=nil } -- new msg table anims = {} local _getPlayerName = getPlayerName local function getPlayerName ( player ) return _getPlayerName ( player ) : gsub ( "#%x%x%x%x%x%x", "" ) end function buildPlayerList() local x,y = guiGetScreenSize() local width,height = 175,350 x = x-width y = (y-height)/2 newmsg.img = guiCreateStaticImage(681.0000,134.0000, 42.0000,34.0000, "image/chat-icon.png", false) -- mail message icon newmsg.lbl = guiCreateLabel(553.0000,175.0000, 244.0000, 19.0000, "", false) guiLabelSetHorizontalAlign(newmsg.lbl, "right", true) guiSetAlpha(newmsg.img, 0) --guiSetAlpha(newmsg.lbl, 0) wndPlayers = guiCreateWindow(x,y,width,height, "Private Chat", false) grdPlayers = guiCreateGridList(.025,.065, .975,.915, true, wndPlayers) colPlayers = guiGridListAddColumn(grdPlayers, "Players", 0.85) local players = getElementsByType("player") for k,v in ipairs(players) do addPlayerToList(v) end guiWindowSetSizable(wndPlayers, false) guiSetProperty(wndPlayers, "RollUpEnabled", "true") guiSetProperty(wndPlayers, "Dragable", "true") guiSetAlpha(wndPlayers, 0) -- create animations for it anims.plfadein = Animation.create(wndPlayers, Animation.presets.guiFadeIn(1000)) anims.plfadeout = Animation.create(wndPlayers, Animation.presets.guiFadeOut(1000)) anims.nmfadein = Animation.create(newmsg.img, Animation.presets.guiFadeIn(1000)) anims.nmfadeout = Animation.create(newmsg.img, Animation.presets.guiFadeOut(1000)) anims.nmtextin = Animation.create(newmsg.lbl, Animation.presets.guiFadeIn(1000)) anims.nmtextout = Animation.create(newmsg.lbl, Animation.presets.guiFadeOut(1000)) --[[ local x,y = guiGetPosition(newmsg.img) outputDebugString("guigetPostions: " ..tostring(x).." "..tostring(y)) local scrx,scry = guiGetScreenSize() anims.nmslidein = Animation.create(newmsg.img, Animation.presets.guiMove(x,y))--, 1000,false, scrx,scry, false)) anims.nmslideout = Animation.create(newmsg.img, Animation.presets.guiMove(scrx,scry))--, 1000,false, x,y, false)) ]] bindKey("F2", "down", togglePmGui) end function addPlayerToList(ply) --outputDebugString("addPlayerToList:" ..getPlayerName(ply)):gsub("#%x%x%x%x%x%x","") local row = guiGridListAddRow(grdPlayers) local name = getPlayerName(ply) guiGridListSetItemText(grdPlayers,row,colPlayers, name, false, false) end function removePlayerFromList(ply) --outputDebugString("removePlayerFromList:" ..getPlayerName(ply)):gsub("#%x%x%x%x%x%x","") local name=getPlayerName(ply) for row=0,guiGridListGetRowCount(grdPlayers) do if guiGridListGetItemText(grdPlayers, row, colPlayers) == name then guiGridListRemoveRow(grdPlayers, row) outputDebugString("remove row" ..tostring(row)) end end end function showPmGui(state) if state == true then anims.plfadein:play() for k,v in pairs(chat) do guiSetVisible(chat[k].wnd,true) end showCursor(true) elseif state == false then anims.plfadeout:play() for k,v in pairs(chat) do guiSetVisible(chat[k].wnd,false) end showCursor(false) guiSetInputEnabled(false) end end function togglePmGui() if not anims.plfadein:isPlaying() and not anims.plfadeout:isPlaying() then if guiGetAlpha(wndPlayers) > .1 then showPmGui(false) else showPmGui(true) end end end function buildChatWindow(ply) local x,y = guiGetScreenSize() local width,height = 300,250 x = x*.5 y = y*.5 chat[ply] = {} chat[ply].wnd = guiCreateWindow(x,y,width,height, getPlayerName(ply):gsub("#%x%x%x%x%x%x","") , false) chat[ply].memo = guiCreateMemo(.025,.075, .95,.55, "", true, chat[ply].wnd) chat[ply].edit = guiCreateEdit(.025,.65, .95,.15, "", true, chat[ply].wnd) chat[ply].btnClose = guiCreateButton(.1,.83, .3,.125, "Close", true, chat[ply].wnd) chat[ply].btnSend = guiCreateButton(.6,.83, .3,.125, "Send", true, chat[ply].wnd) guiMemoSetReadOnly(chat[ply].memo, true) guiWindowSetSizable(chat[ply].wnd, false) guiSetProperty(chat[ply].wnd, "RollUpEnabled", "true") guiSetProperty(chat[ply].wnd, "Dragable", "true") if anims.plfadein:isPlaying() then-- in process of fading in guiSetVisible(chat[ply].wnd, true) elseif anims.plfadeout:isPlaying() then -- in process of fading out guiSetVisible(chat[ply].wnd, false) else -- not in process of either if guiGetAlpha(wndPlayers) > .1 then guiSetVisible(chat[ply].wnd, true) -- is showing else guiSetVisible(chat[ply].wnd, false) -- isnt showing end end end function destroyChatWindow(ply) if chat[ply] and isElement(chat[ply].wnd) then destroyElement(chat[ply].wnd) chat[ply] = nil end end function sendChatMessage(ply) --outputDebugString("sendChatMessage: " .. tostring(ply)) if chat[ply] and isElement(chat[ply].wnd) then local newText = guiGetText(chat[ply].edit) if newText and string.len(newText) > 0 then local oldText = guiGetText(chat[ply].memo) if not oldText then oldText = "" end oldText = oldText .. getPlayerName(g_LocalPlayer):gsub("#%x%x%x%x%x%x","") .. ": " .. newText .. "\n" guiSetText(chat[ply].memo, oldText) guiSetText(chat[ply].edit, "") guiMemoSetCaretIndex(chat[ply].memo, string.len(oldText)) triggerServerEvent("onGUIPrivateMessage", g_LocalPlayer, ply,newText) end end end function recieveChatMessage(ply, msg) --outputDebugString("recieveChatMessage: " .. msg) if not chat[ply] then buildChatWindow(ply) end newmsg.show = true newmsg.tick = getTickCount() ---guiSetText(newmsg.lbl, getPlayerName(ply):gsub("#%x%x%x%x%x%x","") .. ": " .. msg .. "\n") guiSetText(newmsg.lbl, "New Messages " .. getPlayerName(ply):gsub("#%x%x%x%x%x%x","") .. "\n") anims.nmfadein:play() anims.nmtextin:play() --anims.nmslidein:play() local oldText = guiGetText(chat[ply].memo) if not oldText then oldText = "" end oldText = oldText .. getPlayerName(ply):gsub("#%x%x%x%x%x%x","") .. ": " .. msg .. "\n" guiSetText(chat[ply].memo, oldText) guiMemoSetCaretIndex(chat[ply].memo, string.len(oldText)) end event_resource_start = function(res) buildPlayerList() outputChatBox("",255,255,255,true) end event_resource_stop = function(res) unbindKey("F2", "down", togglePmGui) showPmGui(false) end event_player_join = function() --outputDebugString("onClientPlayerJoin") addPlayerToList(source) end event_player_quit = function() --outputDebugString("onClientPlayerQuit") removePlayerFromList(source) destroyChatWindow(source) end event_gui_click = function(button, state, absx, absy) if button == "left" and state == "up" then if getElementType(source) == "gui-button" then local parent = getElementParent(source) if parent ~= false then local ply = getPlayerFromName(guiGetText(parent)) if ply then if source == chat[ply].btnClose then destroyChatWindow(ply) guiSetInputEnabled(false) elseif source == chat[ply].btnSend then sendChatMessage(ply) guiSetInputEnabled(false) end end end elseif getElementType(source) == "gui-edit" then local parent = getElementParent(source) if parent ~= false then local ply = getPlayerFromName(guiGetText(parent)) if source == chat[ply].edit then guiSetInputEnabled(true) end end else guiSetInputEnabled(false) end end end event_gui_doubleclick = function(button, state, absx, absy) if button == "left" and state == "up" then if source == grdPlayers then local row, col = guiGridListGetSelectedItem(grdPlayers) --outputDebugString("double clicked row: "..tostring(row)) if row == -1 or col == -1 then return end local name = guiGridListGetItemText(grdPlayers, row, col) local ply = getPlayerFromName(name) if not chat[ply] then buildChatWindow(ply) end guiBringToFront(chat[ply].wnd) end end end event_gui_accepted = function(element) local parent = getElementParent(source) if parent ~= false then local ply = getPlayerFromName(guiGetText(parent)) if ply then if
-
hola a todos no se halguien me podria ayudar Estoy asiendo un radar cuadrado ya casi lo termino pero mi problema es como puedo hacer que los nombres de los jugadores se puedan ver en mi miniradar Esta es una parte del codigo local screenx, screeny = guiGetScreenSize( ); local posX = 30; local posY = 157; local width = 145; local height = 145; -- local scale = 1.5; local texture = dxCreateTexture( 'radar.dds', 'dxt5', true, 'clamp', '3d' ); imageWidth, imageHeight = dxGetMaterialSize( texture ); showPlayerHudComponent( "radar", false ) local function getCameraRotation () px, py, pz, lx, ly, lz = getCameraMatrix() local rotz = 6.2831853071796 - math.atan2 ( ( lx - px ), ( ly - py ) ) % 6.2831853071796 local rotx = math.atan2 ( lz - pz, getDistanceBetweenPoints2D ( lx, ly, px, py ) ) rotx = math.deg(rotx) rotz = math.deg(rotz) return rotz end function miniradar( ) local px ,py, pz = getElementPosition( localPlayer ) local mapX = px / ( 6000 / imageWidth ) + ( imageWidth / 2 ) - ( width / scale / 2 ); local mapY = py / ( -6000 / imageHeight ) + ( imageHeight / 2 ) - ( height / scale / 2 ); local cx,cy,cz,tx,ty,tz = getCameraMatrix( ); local rotation = getCameraRotation(); dxDrawImageSection( posX, screeny - posY, width, height, mapX, mapY, width / scale, height / scale, texture, rotation, 0, 0, tocolor( 255, 255, 255, 220 ), false ); end addEventHandler("onClientRender",root, miniradar )
-
does not have errors but wanted to know if possible edit the script to map names the name tag look at mini radar
-
hi all I was seeing a post and guide me to make a new radar but wanted to know how I could edit the map names to apply also to the radar thanks in advance and excuse my bad English Mapnames -- Settings variables local textFont = "default-bold" -- The font of the tag text local textScale = 1 -- The scale of the tag text local fontHeight = dxGetFontHeight(textScale,textFont) -- The height of the font local heightPadding = 1 -- The amount of pixels the tag should be extended on either side of the vertical axis local widthPadding = 1 -- The amount of pixels the tag should be extended on either side of the horizontal axis local xOffset = 8 -- Horizontal distance between the player blip and the tag local yOffset = fontHeight/2 -- Vertical distance between the player blip and the top of the tag local minAlpha = 10 -- If blip alpha falls below this, the tag won't the shown local textAlpha = 255 local rectangleColor = tocolor(0,0,0,230) local function drawMapNames() if exports.maximap:isPlayerMapVisible() then for k,v in ipairs(getElementsByType("blip")) do local attached=getElementAttachedTo(v) if isElement(attached) and getElementType(attached)=="player" then local px,py = getElementPosition(attached) -- Player's position local x,y = exports.maximap:getMapFromWorldPosition(px,py) -- Get the blip position on the map x = x+xOffset -- X for the nametag y = y-yOffset -- Y for the nametag local pname = getPlayerName(attached) -- Player name local nameLength = dxGetTextWidth(pname,textScale,textFont) -- Width of the playername local r,g,b = getPlayerNametagColor(attached) -- Player's nametag color local _,_,_,a = getBlipColor(v) -- Blip alpha if a>minAlpha then dxDrawRectangle(x-widthPadding,y+heightPadding,nameLength+widthPadding*2,fontHeight-heightPadding*2,rectangleColor,false) dxDrawText(pname,x,y,x+nameLength,y+fontHeight,tocolor(r,g,b,textAlpha),textScale,textFont,"left","top",false,false,false) end end end end end addEventHandler("onClientRender",getRootElement(),drawMapNames) radar local screenx, screeny = guiGetScreenSize( ); local posX = 30; local posY = 157; local width = 145; local height = 145; -- local scale = 1.5; local texture = dxCreateTexture( 'radar.dds', 'dxt5', true, 'clamp', '3d' ); imageWidth, imageHeight = dxGetMaterialSize( texture ); showPlayerHudComponent( "radar", false ) local function getCameraRotation () px, py, pz, lx, ly, lz = getCameraMatrix() local rotz = 6.2831853071796 - math.atan2 ( ( lx - px ), ( ly - py ) ) % 6.2831853071796 local rotx = math.atan2 ( lz - pz, getDistanceBetweenPoints2D ( lx, ly, px, py ) ) rotx = math.deg(rotx) rotz = math.deg(rotz) return rotz end function miniradar( ) local px ,py, pz = getElementPosition( localPlayer ) local mapX = px / ( 6000 / imageWidth ) + ( imageWidth / 2 ) - ( width / scale / 2 ); local mapY = py / ( -6000 / imageHeight ) + ( imageHeight / 2 ) - ( height / scale / 2 ); local cx,cy,cz,tx,ty,tz = getCameraMatrix( ); local rotation = getCameraRotation(); dxDrawImageSection( posX, screeny - posY, width, height, mapX, mapY, width / scale, height / scale, texture, rotation, 0, 0, tocolor( 255, 255, 255, 220 ), false ); end addEventHandler("onClientRender",root, miniradar )
