-
Posts
684 -
Joined
-
Last visited
Everything posted by EstrategiaGTA
-
Need help with my script - outputChatBox flood problem
EstrategiaGTA replied to MaRcell's topic in Scripting
@MaRcell change this: outputChatBox(" ") Into this: outputChatBox:(" ", source) -
Checking the vehicle each time the player enters/exits vehicles and so will be better for the perfomance. You shouldn't really use onClientRender for this, because it will get the player vehicle each frame (and you know, this would mean you get the player's vehicle 50 times per second, or so). The right function is getPedOccupiedVehicle, not getPedVehicleOccupied.
-
Estás setteando la posición del objeto sumándole 1 a su valor x inicial, y eso lo cumple siempre. Lo que pasa es que debes actualizar la posición, hazlo así: local x, y, z = getElementPosition (objeto) setElementPosition (objeto, x+1, y, z)
-
This VIP system looks fine. Use this exported function to check if the player is VIP/donator: if exports.vip_system:isPlayerDonator(player) then --if he's a VIP then do... --your code. end
-
What VIP system are you using?
-
https://forum.multitheftauto.com/announcement/3-update-2-problems-with-logging-in-and-out-or-staying-logged-in/
- 84 replies
-
- 1
-
-
- mtasa
- forum stuff
-
(and 5 more)
Tagged with:
-
Good job, but please English in this sub-forum! Se vc quiser falar português: https://forum.multitheftauto.com/forum/97-portuguese-português/
-
Great job, keep it up! It's way more realistic than the default GTA:SA!
-
I found the mobile version very cool and easy to use. It lacks some features (Code, Wiki page, Spoiler, Colored Divbox...) but it's indeed very easy to use and well done. Good job!
- 84 replies
-
- mtasa
- forum stuff
-
(and 5 more)
Tagged with:
-
https://community.multitheftauto.com/index.php?p=resources&s=details&id=11324 https://community.multitheftauto.com/index.php?p=resources&s=details&id=5679
-
Ayuda con markers y restricciones para teams
EstrategiaGTA replied to Razor70538's topic in Scripting
De nada. Ya estoy en PC, a ver, mira: local tName = "Red" --nombre del equipo for _, p in ipairs (getElementsByType("player")) do --obtenemos los jugadores y hacemos una loop. if getPlayerTeam(p) and getTeamName(getPlayerTeam(p)) == tName then --para cada player verificamos si tienen equipo, y si ese equipo es el que buscamos. outputChatBox ("Mensaje", p, 255, 0, 0) --se envía el mensaje al player si reúne la condición end end -
Ayuda con markers y restricciones para teams
EstrategiaGTA replied to Razor70538's topic in Scripting
Usa una for-loop, mira, te hago un código rápido, estoy en el móvil así que no puedo explicar mucho xD: local tName = "Red" --nombre del equipo for _, p in ipairs (getElementsByType("player")) do if getPlayerTeam(p) and getTeamName(getPlayerTeam(p)) == tName then outputChatBox ("Mensaje", p, 255, 0, 0) end end -
Ayuda con markers y restricciones para teams
EstrategiaGTA replied to Razor70538's topic in Scripting
De nada, si quieres utiliza la useful function que te di para abreviar (útil si vas a utilizar esta condición varias veces) -
Ayuda con markers y restricciones para teams
EstrategiaGTA replied to Razor70538's topic in Scripting
O usa directamente la useful function de la wiki isPlayerInTeam (player, "nombre de team") Eso es que no hay ningún player, postea el código -
Ayuda con markers y restricciones para teams
EstrategiaGTA replied to Razor70538's topic in Scripting
Usa getPlayerTeam y getTeamName, por ejemplo: if getTeamName (getPlayerTeam(player)) == "NOMBRE TEAM" then Y ya añades tu código. -
Usa addCommandHandler
-
Post your full housing system... We can't guess the problem out of 6 lines. To make a GUI element visible, use guiSetVisible.
-
Hello, please use the Scripting sub-forum for this. You could either use removeCommandHandler or use tables, so if the user is out of the table, then this user will be able to use the command, but if the user is inside the table, then this same user won't be able to use the command (use setTimer for 10 minutes to remove the user from the table). Example: notAllowedUsers = { } notAllowedUsers[player] = true --use this when the user executes the command. if not notAllowedUsers[player] then --use this to check if the player is NOT in the table (so he can use the command) And then just use a timer for 600000 seconds (10 mins), when the time passes, do this: notAllowedUsers[player] = nil
-
... Wrong In dxDrawRectangle you have x, y, width, height. In dxDrawText you have x, y, final X and final Y. final X = x + rectangleWidth final Y = y + rectangleHeight For example, in your code: dxDrawRectangle > x=530 ; width=214 dxDrawText > x=530 ; finalX=744 You can see it, right? I know it may be confusing at first. _____ Sorry for the double-post but I can't edit my old message...
-
Hey there, welcome to the MTA forums! You can ask for a script, but no one will really do it for you... You have these three options: - Use MTA Community resources. - Pay a scripter for this resource. - Learn Lua and script it yourself. As you said, you didn't find the resource you wanted in the MTA Community, so you will have to either pay a scripter or learn Lua yourself. If you want to learn Lua and have doubts or problems with your scripts, feel free to ask for help in the MTA Scripting sub-forum. Good luck.
-
Yes, my bad, thanks @TAPL I'd edit it but I can't
-
You can create a colshape, and use onColShapeHit and destroyElement to destroy the vehicles when they enter the area. Something like this: x, y = 1000, 500 --example; change this to your own. cWidth, cHeight = 30, 20 --width and height for the colshape; change this to your own. myCol = createColRectangle (x, y, cWidth, cHeight) function destroyTheVehicles (player) if getElementType (player) == "player" and isElementInVehicle (player) then destroyElement (getPedOccupiedVehicle (player)) outputChatBox ("Vehicles are not allowed here!", player, 255, 0, 0) end end addEventHandler ("onColShapeHit", myCol, destroyTheVehicles)