-
Posts
1,673 -
Joined
-
Last visited
-
Days Won
6
Everything posted by 0xCiBeR
-
La única manera que te podremos ayudar, es que nos postees, tu script o un link desde donde lo descargaste en la comunidad(si no es tuyo).
-
Perdón, mi error. Copialo de nuevo.
-
Usa el evento 'onPlayerChat' Y estas funciones: isObjectInACLGroup outputChatBox getElementsByType Y la función útil de la wiki te puede ser de mucha utilidad. Y por ahí algunas funciones de colShape para el localChat.
-
inicial = createMarker ( 0, 0, 0,"cylinder", 1.0,0,255,0,150) function primergolpe(hitElement, matchingDimension) if inicial and getElementType(hitElement) == "player" then destroyElement(inicial) segundo = createMarker ( 1, 1, 1,"cylinder", 1.0,250,0,0,150) addEventHandler( "onMarkerHit", segundo, segundogolpe ) end end function segundogolpe(hitElement, matchingDimension) if segundo and getElementType(hitElement) == "player" then destroyElement(segundo) end end addEventHandler( "onMarkerHit", inicial, primergolpe )
-
al iniciar mta, se borra gta_sa.exe
0xCiBeR replied to Facundo15's topic in Ayuda relacionada al cliente/servidor
Si se borro ese archivo debes reinstala GTA no MTA. -
Evita crear múltiples post sobre lo mismo. Y te recomiendo que te pases por estos dos temas: 1 2
-
Por favor, trata de no usar lenguaje vulgar en el foro. En cuanto a lo que te paso, probable editaste mal el archivo s_main.lua que te indique editar en el post anterior. Copia y reemplaza todo el contenido de tu archivo s_main.lua por esto: g_root = getRootElement( ); classGroups = { }; addEvent( "spawn_clientRequestSpawn", true ); addEventHandler( "spawn_clientRequestSpawn", g_root, function( categoryIndex, classIndex, skinIndex, password ) if skinIndex then local class = classGroups[ categoryIndex ].classes[ classIndex ]; if class.password then if not password or password == "" then triggerClientEvent( client, "spawn_requestPassword", root, class.name ); return; elseif password ~= class.password then outputChatBox( "The password you typed in is incorrect! Try again or cancel to choose different class.", client, 200, 50, 50 ); triggerClientEvent( client, "spawn_requestPassword", root, class.name ); return; end end -- line 21: local classACL = aclGetGroup( class.name ); local plrAccount = getPlayerAccount( client ); if ( classACL ) then if ( not isGuestAccount( plrAccount ) ) and ( not isObjectInACLGroup( "user." .. getAccountName( plrAccount ), classACL ) ) then outputChatBox( "No eres un miembro de este clan..Pide reclutacion", client, 200, 50, 50 ); requestMenu( client ); return; elseif isGuestAccount( plrAccount ) then outputChatBox( "Si eres miembro de: \"" .. class.name .. "\" Entonces logueate para spawnear", client, 200, 50, 50 ); requestMenu( client ); return; end end local skin = class.skinMngr.skins[ skinIndex ]; local spawn = true; local spawned; --[[if not classGroups[ cetegoryIndex ].owner then -- if there is NO owner of the clan/gang spawn player spawn = true; else -- if there IS owner of the clan/gang then check if he's member of the clan/gang end]] if spawn then if not class.team then class.team = createTeam( class.name, class.color.red, class.color.green, class.color.blue ); end spawned = spawnPlayer( client, skin.spawnLoc.x, skin.spawnLoc.y, skin.spawnLoc.z, skin.spawnLoc.rot, skin.modelId, 0, 0, class.team ); end if spawned then setElementData( client, "team", class.name ) setElementData( client, "skin", skin.name ) fadeCamera( client, true ); setCameraTarget( client, client ); setTimer( setCameraTarget, 200, 1, client, client ); triggerClientEvent( client, "spawn_SpawnedSuccessfully", client ); --setPlayerMoney( client, 500 ); for _, weapon in ipairs( class.weaponMngr.weapons ) do giveWeapon( client, weapon.id, weapon.ammo, false ); end createBlipAttachedTo( client, 0, 2, class.color.red, class.color.green, class.color.blue ) else triggerClientEvent( client, "spawn_FailedToSpawn", client ); end end end ); addEvent( "spawn_receivePassword", true ); addEventHandler( "spawn_receivePassword", g_root, function( ) end ); addEventHandler( "onPlayerSpawn", g_root, function ( ) end ); addEventHandler( "onPlayerWasted", g_root, function( ) fadeCamera( source, false, 4 ); setTimer( requestMenu, 5000, 1, source ); deleteAllPlayerBlips( source ) end ); function requestMenu( player ) callClientFunc( player, "showSpawnMenu", true, true ); callClientFunc( player, "classSelected" ); end addCommandHandler( "kill", function( plr ) killPed( plr ); end ) function preloadClassesInfo( ) local groups = getElementsByType( "category" ); for _, group in ipairs( groups ) do table.insert( classGroups, Group:New( group ) ); end end addEventHandler( "onResourceStart", getResourceRootElement(), preloadClassesInfo ) function deleteAllPlayerBlips(player) local elements = getAttachedElements(player) if (elements) then for i, element in ipairs(elements) do if (getElementType(element) == "blip") then destroyElement(element) end end end print( "number of players in team: " .. tostring( countPlayersInTeam( getPlayerTeam( player ) ) ) ); end addEventHandler( "onPlayerQuit", g_root, function() deleteAllPlayerBlips(source) end ); ------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------ function callClientFunc( player, funcName, ... ) if #{ ... } ~= 0 then triggerClientEvent( player, "_clientCallFunction", root, funcName, ... ) else triggerClientEvent( player, "_clientCallFunction", root, funcName ) end end addEvent( "_serverCallFunction", true ) addEventHandler( "_serverCallFunction", root, function( funcName, ... ) _G[ funcName ](...) end )
-
De nada. Avisa cualquier otra cosa que necesites.
-
La forma mas sencilla para ti, sería algo así:(adapta lo a tus necesidades) inicial = createMarker ( 0, 0, 0,"cylinder", 1.0,0,255,0,150) function primergolpe(hitElement, matchingDimension) if inicial and getElementType(hitElement) == "player" then destroyElement(inicial) segundo = createMarker ( 1, 1, 1,"cylinder", 1.0,250,0,0,150) end end addEventHandler( "onMarkerHit", inicial, primergolpe )
-
El spawn de @50p tiene una función para ello. Puedes asignarles contraseñas a cada grupo y sino editas el archivo s_main.lua con esto para que funcione con ACLs:
-
Debes agregar el resource a ese grupo y luego a tu cuenta. EJ: <group name="Console"> <acl name="Moderator"></acl> <acl name="SuperModerator"></acl> <acl name="Admin"></acl> <acl name="RPC"></acl> <object name="user.Console"></object> <object name="user.Damn"></object> <object name="resource.bl"></object> </group>
-
Debes meterte en el ACL Console. Mira esta porción de script: addEventHandler("onResourceStart",resourceRoot,function() executeSQLQuery("CREATE TABLE IF NOT EXISTS blacklist_new (serial,name,reason)") for i,v in ipairs ( getElementsByType("player") ) do if not ( isGuestAccount(getPlayerAccount(v)) ) then if ( isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(v)), aclGetGroup("Console")) ) then addCommandHandler("bl",function(player) triggerClientEvent(player,"show",player) end) end end end end) addEventHandler("onPlayerLogin",root,function() if ( isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Console")) ) then addCommandHandler("bl",function(player) triggerClientEvent(player,"show",player) end) end end)
-
You can have multiple IPs, all pointing to the same Dedicated Server.Yo can buy extra IPs, and add them to your server-
-
Oh now that's a problem. Then probably you have a problem with the GUI, or the variables you put in the functions.
-
function admiral() local sx, sy ,sz = getElementPosition(source) local name = getPlayerName(source) local veh = createVehicle(445, sx, sy, sz, 0, 0 ,90, name) warpPedIntoVehicle(source, veh) end PD: If it's posible please use LUA tags..It's easier to read. Thanks!
-
Post the server-side script.(where the "admiral" event is added)
-
+1 una buena manera de evitar usar la función cada vez que quieres obtener la cuenta.
-
El script que te di, soluciona el error.
-
Estas seguro que tenes un acl group llamado VIP? function login() if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("SuperModerator")) then outputChatBox("* #000000[LOGIN] #ffffff El Super Moderador" .. getPlayerName(source) .. "#000000, #00bbcc Ha logueado #000000!!", getRootElement(), 255,0,0, true) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Admin")) then outputChatBox("* #000000[LOGIN] #ffffff El Admin " .. getPlayerName(source) .. "#000000, #00bbcc Ha logueado #000000!!", getRootElement(), 255,0,0, true) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("VIP")) then outputChatBox("* #ff0000[LOGIN] #ffffff El VIP" .. getPlayerName(source) .. "#000000, #00bbcc Ha logueado #000000!!", getRootElement(), 255,0,0, true) end end
-
Actually it is passing the IF statement, beacuse if it wasn't, it wouldn't output "Admiral" Anyway, it's fixed
-
@Dealman if it is returning the correct string, there is also a problem somewhere else, and the variable is actually returning the correct string asi seen in: Post us the server-side Script. Edit: Seems as it fixed it, my bad.
-
addEvent("onPlayerHeadshot",true) addEventHandler("onPlayerDamage", getRootElement(), function (attacker, weapon, bodypart, loss) if bodypart == 9 and weapon == 34 then local result = triggerEvent("onPlayerHeadshot", source, attacker, weapon, loss) if result == true then killPed(source, attacker, weapon, bodypart) end end end ) Anyway you are not showing us the "onPlayerHeadshot" function. That could also be a problem.
-
We do not provide support for this and it is against our rules.