Jump to content

aka Blue

Members
  • Posts

    2,106
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by aka Blue

  1. Usa string.find, supongo.
  2. ¿Esto no podría funcionar? setVehiclePanelState PD: Siento pedir muchas cosas, pero, ¿cómo podría sacar un porcentaje de algo en lua? Es decir, quiero sacar el porcentaje de x variable (ej: sacar el 10% de 90). Gracias.
  3. Perdón por doble post. ¿No hay alguna función para los parachoques?
  4. Buenas, estoy optimizando un sistema de mecánico y estoy buscando una función que haga que solamente se repare una parte del vehículo (puerta derecha, capó, maletero). Gracias.
  5. Asus está vivo, damn. PD: Sube más vidioz kavron.
  6. ¿Sure? Look, you need to execute the command /onService to be inmortal.
  7. Obviamente que no te va a aparecer el login si no se inicia el recurso 'gui' por la falta del recurso SQL. Te pasaré el Paradise hecho por Skype. Agregame: blue.pie3
  8. Damn, im so stupid, sorry. Change the event onPlayerDamage for this: addEventHandler ( "onClientPlayerDamage", getLocalPlayer ( ), function ( attacker, _, _ ) if getElementData ( source, "onService" ) == true or getElementData ( attacker, "onService" ) == true then cancelEvent ( ) end end ) PD: Sorry again, my mistake...
  9. Erase that code and use the code i send it, should work. PD: Not tested but im sure. Should work
  10. Pero has abierto los puertos? Para abrir los puertos debes entrar en 192.168.1.0 o algo así.
  11. Debes llamar a tu proveedor para que te abra el los puertos ya que éstas empresas son como privadas (te lo digo porque yo tengo mi internet contratado en una) y denegan el acceso a la apertura de los puertos.
  12. Para qué haces otro post? Te lo he dicho, debes vincular una base de datos local. Xampp te ofrece esa opción.
  13. Puedes abrir una base de datos con Xampp, más, para vincularla debes editar el settings.xml que te da Paradise y el mysql.lua dentro de la carpeta sql de los resources.
  14. Pues no esperes que se inicie de la nada.
  15. Típico error de paradise. Vinculaste la base de datos?
  16. Is [service], not Service... if isPlayerInTeam ( player ) == "[service]" then
  17. Should work. Check the team if is the same in the script.
  18. Damn, i love it. Keep it up please
  19. Ehm, ¿do you edit the code that i give to you? Because, this is not normal... bad argument @ 'getElementData' [Expected element at argument 1, got string 'texon'] The only getElementData's are: getElementData ( player, "admin.number" ) or 0 ( getElementData ( source, "editing" ) == true ) And, for the edit... this is not my problem, the message tells you where is the error: Download error: Error downloading requested files. Couldn't connect to server. [Failed connect to 87.98.180.15:22060; No error] [CSTtex/texture_sv.lua]
  20. Well, this should work. Try it: function isPlayerInTeam(player, team) assert(isElement(player) and getElementType(player) == "player", "Bad argument 1 @ isPlayerInTeam [player expected, got " .. tostring(player) .. "]") assert((not team) or type(team) == "string" or (isElement(team) and getElementType(team) == "team"), "Bad argument 2 @ isPlayerInTeam [nil/string/team expected, got " .. tostring(team) .. "]") return getPlayerTeam(player) == (type(team) == "string" and getTeamFromName(team) or (type(team) == "userdata" and team or (getPlayerTeam(player) or true))) end addCommandHandler ( "onService", function ( player, commandName, mode ) if isPlayerInTeam ( player ) == "[service]" then if mode == "true" then setElementData ( player, "onService", true ) outputChatBox ( "Now you are on service.", player, 0, 255, 0 ) toggleControl ( player, "fire", false ) elseif mode == "false" then setElementData ( player, "onService", false ) outputChatBox ( "Now you are out of service.", player, 0, 255, 0 ) toggleAllControls ( player, true ) end end end ) addEventHandler ( "onPlayerDamage", getRootElement ( ), function ( attacker, _, _, _ ) if getElementData ( attacker, "onService" ) == true or getElementData ( source, "onService" ) == true then cancelEvent ( ) end end ) addEventHandler ( "onVehicleDamage", getRootElement ( ), function ( loss ) local player = getVehicleOccupant ( source ) if player and getElementData ( player, "onService" ) == true then cancelEvent ( ) end end )
  21. Ajá, ok. My mistake, sorry. Try this and tell me if it works: function startEdit ( player ) local adminlevel = getElementData ( player, "admin.number" ) or 0 if ( adminlevel >= 2 ) then showCursor ( true ) setElementData ( player, "editing", true ) outputChatBox("[Texture Mode ON] Please, select an object.", player, 255, 255, 255) end end addCommandHandler ( "texon", startEdit ) addEventHandler ( "onClientClick", getRootElement ( ), function ( button, state, _, _, _, _, _, clickedElement ) if ( getElementData ( source, "editing" ) == true ) then if ( button == "left" ) and ( state == "down" ) then if ( clickedElement ) then setElementData ( source, "underEdit", true ) showCursor ( false ) outputChatBox("Object selected", source, 255, 255, 255) end end end end )
  22. ¿This? setPedAnimation ( ped, "COLT45", "colt45_reload ", 1)
  23. I don't understand. ¿You want an elementData that allows you be inmortal o something like that?
×
×
  • Create New...