-
Posts
2,106 -
Joined
-
Last visited
-
Days Won
6
Everything posted by aka Blue
-
Usa string.find, supongo.
-
¿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.
-
Perdón por doble post. ¿No hay alguna función para los parachoques?
-
Gracias @Asus
-
Don't forget md5.
-
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.
-
Asus está vivo, damn. PD: Sube más vidioz kavron.
-
¿Sure? Look, you need to execute the command /onService to be inmortal.
-
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
-
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...
-
Erase that code and use the code i send it, should work. PD: Not tested but im sure. Should work
-
Pero has abierto los puertos? Para abrir los puertos debes entrar en 192.168.1.0 o algo así.
-
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.
-
Para qué haces otro post? Te lo he dicho, debes vincular una base de datos local. Xampp te ofrece esa opción.
-
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.
-
Pues no esperes que se inicie de la nada.
-
Típico error de paradise. Vinculaste la base de datos?
-
Is [service], not Service... if isPlayerInTeam ( player ) == "[service]" then
-
Should work. Check the team if is the same in the script.
-
Damn, i love it. Keep it up please
-
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]
-
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 )
-
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 )
-
¿This? setPedAnimation ( ped, "COLT45", "colt45_reload ", 1)
-
I don't understand. ¿You want an elementData that allows you be inmortal o something like that?
