-
Posts
1,491 -
Joined
-
Last visited
-
Days Won
3
Everything posted by Walid
-
simply because (word1 ; word2) a nil value try this local Table = { "Walid", "scaryface87", }
-
Yes you can use Math.random with words. Example local Table = { -- Words here } word = Table[math.random(#Table)]
-
You are welcome , try always to change the subject of the topic when your problem is solved.
-
Are you sure that it's "Médico" not "Médicos" because here you are trying to use "Médicos" Anyways try this before you check my code function checkTeam (player) local playerTeam = getPlayerTeam(player) if (playerTeam) then outputChatBox("Your team is "..getTeamName(playerTeam),player,255,0,0) end end addCommandHandler("team",checkTeam) function medicenterVehicle ( player, seat, jacked ) if not isPlayerInTeam(player,"Médico") then cancelEvent() outputChatBox ( "Debes de ser un médico para poder entrar al vehículo.", player ) end end addEventHandler ( "onVehicleStartEnter", getRootElement(), medicenterVehicle ) function isPlayerInTeam(src, TeamName) if src and isElement ( src ) and getElementType ( src ) == "player" then local team = getPlayerTeam(src) if team then if getTeamName(team) == TeamName then return true else return false end end end end
-
You mean even medic players can't enter the vehicle if yes try this client side function medicenterVehicle ( player, seat, jacked ) if player == getLocalPlayer() then local playerTeam = getPlayerTeam(player) if (playerTeam) then if not (getTeamName(playerTeam) == "Médico") then cancelEvent() outputChatBox ( "Debes de ser un médico para poder entrar al vehículo.", player ) end end end end addEventHandler("onClientVehicleStartEnter",root,medicenterVehicle)
-
Try this it should work function medicenterVehicle ( player, seat, jacked ) local playerTeam = getPlayerTeam(player) if (playerTeam) then if getTeamName(playerTeam) ~= "Médico" then cancelEvent() outputChatBox ( "Debes de ser un médico para poder entrar al vehículo.", player,255,0,0 ) end end end
-
it should work medicVehicles = {[416]=true, [563]=true } medicTeam = { ['Médicos']=true } function medicenterVehicle ( player, seat, jacked ) local model = getElementModel ( source ) local medic = getTeamName(getPlayerTeam (player)) if ( medicVehicles[model] and ( not medicTeam[medic] ) and seat == 0 ) then cancelEvent() outputChatBox ( "Debes de ser un médico para poder entrar al vehículo.", player,255,0,0) end end addEventHandler ( "onVehicleStartEnter", getRootElement(), medicenterVehicle )
-
that's wrong replace source with player here i think he is trying to use "onVehicleStartEnter" and the source of this event is the vehicle in which a player began to enter.
-
man why you edit my code copy and past local markers = {} function attchMarkerToAllVehicle () for i, vehicle in pairs(getElementsByType("vehicle")) do if not markers[vehicle] then local marker = createMarker( 0,0,0,"arrow",0.5,224,255,255,170) attachElements ( marker, vehicle, -1.5, 0, 1 ) markers[vehicle] = marker addEventHandler("onMarkerHit", markers[vehicle],kickit) end end end setTimer(attchMarkerToAllVehicle,1000,0) function destroyMarker() if getElementType(source) == "vehicle" then if markers[source] and isElement(markers[source]) then destroyElement (markers[source]) removeEventHandler("onMarkerHit", markers[source],kickit) end end end addEventHandler("onElementDestroy", getRootElement(),destroyMarker) function onResourceStart ( ) local players = getElementsByType ( "player" ) -- Store all the players in the server into a table for key, player in ipairs ( players ) do -- for all the players in the table setPlayerNametagShowing ( player, false ) -- turn off their nametag end end addEventHandler ( "onResourceStart", resourceRoot, onResourceStart ) function onPlayerJoin ( ) setPlayerNametagShowing ( source, false ) end addEventHandler ( "onPlayerJoin", root, onPlayerJoin ) function kickit(hitElement, matchingDimension) if matchingDimension and isElement(hitElement) and getElementType(hitElement) == "player" then outputChatBox("Working!",hitElement) end
-
what did you try it both working fine i gave you two examples
-
it must be like this addEventHandler("onMarkerHit", markers[vehicle],kickit) or addEventHandler("onMarkerHit", marker ,kickit)
-
the owner already asked me to stop helping you , so stop using leacked scripts. locked
-
Try this function kickit(hitElement, matchingDimension) if matchingDimension and isElement(hitElement) and getElementType(hitElement) == "player" then outputChatBox("Working!",hitElement) end end addEventHandler("onMarkerHit", markers[source],kickit) -- it must be inside the function
-
ye ik , but how to make it exported to the ADMIN PANEL ...(default admin panel "P") really you are so funny as i told you can't fix it Unless if you edit the default ban system.
-
you need to use "onClientPreRender" event to make the shader appear for a long time. try this it should work local root = getRootElement() local resourceRoot = getResourceRootElement(getThisResource()) local screenWidth, screenHeight = guiGetScreenSize() local blurStrength = 6 local myScreenSource = dxCreateScreenSource(screenWidth, screenHeight) addEventHandler ("onClientResourceStart", resourceRoot, function () local screenW, screenH = guiGetScreenSize() ventanaclases = guiCreateWindow(10, (screenH - 369) / 2, 352, 369, "[ZNEXT] Elección de clases", false) guiWindowSetSizable(ventanaclases, false) labelclases = guiCreateLabel(10, 22, 89, 19, "Elige una clase:", false, ventanaclases) memoclases = guiCreateMemo(124, 43, 218, 316, "¡Bienvenid@ a ZNEXT: Zombies!\nAquí te vamos a enseñar los tipos de clases que puedes elegir a tu comodidad:\n\n\n\nRecibe una flor que sirve como forma de curar a la gente al golpe, además tiene regeneración de vida. Capacidad nula de atacar bases.\n\n\nArregla coches al entrar en ellos y escribir el comando /repararvehiculo. Tardas 10 segundos en repararlo.\n\n\nVende armas al escribir /vender, sus armas son más baratas y recibes menos dinero del que vendes con las armas.\n\n\nPiloto de rescate de Base 17, ayuda a la gente perdida a volver a la base o a transportar gente de un lugar a otro, gana dinero por cada 10 segundos cuando alguien está de copiloto.\n\n\nAsesina gente y gana 1500$, pero a los asesinos también se les captura, por ello, los que asesinen al bandido, ganarán 3000$.\n\n\nSólo está disponible si eres donante del server, pagando con PayPal al menos 2EUR.\n\n\nEl equipo de Staff: Moderadores, Super Moderadores, Community Managers y Admins.\n\n\nNo trabajas en nada, simplemente quieres jugar sin importarte un rol en general.\n\n\nEstos botones están en prueba, los dejamos ahí para evitar crear botones para futuras clases.", false, ventanaclases) guiMemoSetReadOnly(memoclases, true) botclass1 = guiCreateButton(10, 43, 115, 28, "MÉDICO", false, ventanaclases) guiSetFont(botclass1, "default-bold-small") guiSetProperty(botclass1, "NormalTextColour", "FF76EA84") botclass2 = guiCreateButton(10, 71, 115, 28, "MECÁNICO", false, ventanaclases) guiSetFont(botclass2, "default-bold-small") guiSetProperty(botclass2, "NormalTextColour", "FFF5F16C") botclass3 = guiCreateButton(10, 99, 115, 28, "TRAFICANTE", false, ventanaclases) guiSetFont(botclass3, "default-bold-small") guiSetProperty(botclass3, "NormalTextColour", "FFAE2BEB") botclass4 = guiCreateButton(10, 127, 115, 28, "RESCATE AÉREO", false, ventanaclases) guiSetFont(botclass4, "default-bold-small") guiSetProperty(botclass4, "NormalTextColour", "FF17FCEE") botclass5 = guiCreateButton(10, 155, 115, 28, "BANDIDO", false, ventanaclases) guiSetFont(botclass5, "default-bold-small") guiSetProperty(botclass5, "NormalTextColour", "FFCF0505") botclass6 = guiCreateButton(10, 183, 115, 28, "PROTECCIÓN MILITAR", false, ventanaclases) guiSetFont(botclass6, "default-bold-small") guiSetProperty(botclass6, "NormalTextColour", "FF1E641C") botclass7 = guiCreateButton(10, 211, 115, 28, "STAFF", false, ventanaclases) guiSetFont(botclass7, "default-bold-small") guiSetProperty(botclass7, "NormalTextColour", "FFAAAAAA") botclass8 = guiCreateButton(10, 239, 115, 28, "SIN OFICIO", false, ventanaclases) guiSetFont(botclass8, "default-bold-small") guiSetProperty(botclass8, "NormalTextColour", "FFFFFFFF") botclass9 = guiCreateButton(10, 267, 115, 28, "(Botón inútil)", false, ventanaclases) guiSetProperty(botclass9, "NormalTextColour", "FF0E7164") botclass10 = guiCreateButton(10, 295, 115, 28, "(Botón inútil)", false, ventanaclases) guiSetProperty(botclass10, "NormalTextColour", "FF0E7164") botclass11 = guiCreateButton(10, 321, 115, 28, "(Botón inútil)", false, ventanaclases) guiSetProperty(botclass11, "NormalTextColour", "FF0E7164") guiSetVisible (ventanaclases, false) if getVersion ().sortable < "1.3.1" then outputChatBox("Resource is not compatible with this client.") return else blurShader, blurTec = dxCreateShader("shaders/BlurShader.fx") if (not blurShader) then outputChatBox("Could not create blur shader. Please use debugscript 3.") else outputChatBox(blurTec .. " was started.") end end end ) addEvent ("abrirventana",true) addEventHandler ("abrirventana", getRootElement(), function () setCameraMatrix (-425,2627,86, -514,2589,54) guiSetVisible (ventanaclases, true) showCursor (true) addEventHandler("onClientPreRender", root,drawShader) end ) addEvent ("amosnose",true) addEventHandler ("amosnose", getRootElement(), function() guiSetVisible (ventanaclases, false) if (blurShader) then removeEventHandler("onClientPreRender", root,drawShader) destroyElement(blurShader) blurShader = nil setCameraTarget (localPlayer) showCursor (false) end end ) addEventHandler ("onClientGUIClick", guiRoot, function () if source == botclass1 then triggerServerEvent ("team1", localPlayer) elseif source == botclass2 then triggerServerEvent ("team2", localPlayer) elseif source == botclass3 then triggerServerEvent ("team3", localPlayer) elseif source == botclass4 then triggerServerEvent ("team4", localPlayer) elseif source == botclass5 then triggerServerEvent ("team5", localPlayer) elseif source == botclass6 then triggerServerEvent ("team6", localPlayer) elseif source == botclass7 then triggerServerEvent ("team7", localPlayer) elseif source == botclass8 then triggerServerEvent ("team8", localPlayer) end end ) function drawShader() if (blurShader) then dxUpdateScreenSource(myScreenSource) dxSetShaderValue(blurShader, "ScreenSource", myScreenSource); dxSetShaderValue(blurShader, "BlurStrength", blurStrength); dxSetShaderValue(blurShader, "UVSize", screenWidth, screenHeight); dxDrawImage(0, 0, screenWidth, screenHeight, blurShader) end end
-
you create it ? stop lie pls -,- it made by me .. (and if you dont want help me , dont reply ....) lol are you sure so why you can't fix it. more than that i'm pretty sure that there is nothing wrong in this code and you will never be able to fix it did you know why , becuase you need to include an other resource.
-
leacked script because i create it a long time ago for COR server. no one will help you
-
show me the client side function. Try this it should work addEvent ("team7", true) addEventHandler ("team7", getRootElement(), function() local account = getPlayerAccount (source) if not isGuestAccount(account) then local accName = getAccountName (account) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then setPlayerTeam (source, admins) setElementPosition (source,-183,2629,63.3) triggerClientEvent (source, "amosnose", source) elseif isObjectInACLGroup ("user."..accName, aclGetGroup ( "Moderator" ) ) then setPlayerTeam (source, mods) triggerClientEvent (source, "amosnose", source) setElementPosition (source,-183,2629,63.3) elseif isObjectInACLGroup ("user."..accName, aclGetGroup ( "SuperModerator" ) ) then setPlayerTeam (source, mods) triggerClientEvent (source, "amosnose", source) setElementPosition (source,-183,2629,63.3) elseif isObjectInACLGroup ("user."..accName, aclGetGroup ( "cmanager" ) ) then setPlayerTeam (source, mods) triggerClientEvent (source, "amosnose", source) setElementPosition (source,-183,2629,63.3) else outputChatBox ("No eres de ningún equipo de Staff.") end end end)
-
U don't know nothing about LUA language and you want to create an RPG server. i recommend you to read this Wiki instated of wasting your time.
-
all whay you need is guiCreateButton() guiGridListGetItemText() triggerServerEvent() onClientGUIClick()
-
exactly Also you can use sth like this -- Client GodMod_Button = guiCreateButton(556, 265, 133, 48, "", false) function guiclick() if source == GodMod_Button then triggerServerEvent("godMod",localPlayer) end end addEventHandler("onClientGUIClick", resourceRoot, guiclick) -- Server function toggleGodMode() local account = getPlayerAccount(source) if (not account or isGuestAccount(account)) then return end local accountName = getAccountName(account) if ( isObjectInACLGroup ( "user.".. accountName, aclGetGroup ( "Admin" ) ) ) then if getElementData(source,"invincible") then setElementData(source,"invincible",false) outputChatBox("God Mode is now Disabled.",source,0,255,0) else setElementData(source,"invincible",true) outputChatBox("God Mode is now Enabled.",source,0,255,0) end end end addEvent("godMod",true) addEventHandler("godMod",root,toggleGodMode)