-
Posts
369 -
Joined
-
Last visited
-
Days Won
4
Everything posted by WorthlessCynomys
-
When the player uses the command or triggers this function, check it's team/acl group, if it is the one needed. If not, don't do a single thing, or maybe output some msg.
-
Could you correct the question and provide some more information, please?
-
Could you post the lazyQuery function, please?
-
chat_range=100 addEventHandler("onPlayerJoin",getRootElement(), function () bindKey(source,"u","down","chatbox","Local") end) addEventHandler("onResourceStart",getResourceRootElement(getThisResource()), function () for index, player in pairs(getElementsByType("player")) do bindKey(player,"u","down","chatbox","Local") end end) function isPlayerInRangeOfPoint(player,x,y,z,range) local px,py,pz=getElementPosition(player) return ((x-px)^2+(y-py)^2+(z-pz)^2)^0.5<=range end function onChat(player,_,...) local px,py,pz=getElementPosition(player) local dm = getElementDimension(player) local msg = table.concat({...}, " ") local nick=getPlayerName(player) local r,g,b = getPlayerNametagColor(player) for _,v in ipairs(getElementsByType("player")) do if isPlayerInRangeOfPoint(v,px,py,pz,chat_range) then outputChatBox("(Local) "..nick..": "..msg,v,r,g,b,true) end -- outputServerLog("(Local) "..nick..": "..msg,true) end end addCommandHandler("Local",onChat) Next time use the this code thing. It's the "<>" button. You have to use a for iteration btw, where you get the dimension of the players nearby (or all the players) and make an if that checks if the players' dimension is the same. If it is, only then do the outputChatBox for that player. getElementDimension return the dimension an element is in.
-
Show me the line with the dbConnect
- 9 replies
-
- mta
- connection
-
(and 7 more)
Tagged with:
-
Go to WIKI and read what arguments dbConnect has. There are a few example lines too, including a mysql connection. You can copy paste it and edit the line so it works for you.
- 9 replies
-
- mta
- connection
-
(and 7 more)
Tagged with:
-
There's a debug option, showsound I think, which lists the playing sounds' ids in the debugscript, so you can identify the fountains' sound and turn it off with setWorldSoundEnabled. Something like this.
-
Since in your mods, the only way to get money is by your script giving it, make a function that you can call every time you give money to a player.
-
I assume, you store the items in a way like {item, amount} or something similar. Now if you store it like {item, amount, {special data}} then you'll be able to make uniqe items. That third part in the table won't hurt anything, however you can access it when needed.
-
Okay, cool, thanks. I'Il be on PC like 20 hours from now.
-
I deleted the code, since it wasnt successful. I have a picture of an arm, that i would like to draw from the bottom to the top. I can't show it to you since I'm from mobile now. What I need is the idea of making this. So i know that RenderTarget crops everything that would be outside its borders, but when i resized the renderTarget, it made the picture messy and full of pixels.
-
It would be a shape. So like a muscle, that has an outline and a fill based on a value.
-
Hy! I would like to make a dxDraw indicator that shows stamina. I wanted to make a picture, that fills up to a certain level based on a value, so I tried using dxDrawImageSection and RenderTarget too, but I couldn't make it. It is important that I want it to be relative, so like I have a 200x200 size picture that I draw in 80x80, or in 50x50 and so on based on the user's resolution. Could someone help me in this?
-
The problem is that in function localRoot the radar is local which means the addEventHandler doesn't "see" it. Remove the local and it should work. Btw I sent you a message, you can write if you need help.
-
addEventHandler("onMarkerHit", marker, function(hitElement) if (getElementType(hitElement) == "object") then -- TODO here end end )
-
onMarkerHit returns the hitElement. Get it's type with getElementType
-
Oh... még "fiatal" Majd belejössz, észre sem fogod venni, hogy már milyen dolgokat megírsz.
-
Mióta scriptelsz?
-
oh. ez mondjuk logikus
-
Valószínűleg az SQL querykkel van a baj valahol. Mondjuk a tábla létrehozásánál. De ezt jó idő lenne átnézni meg debugolni.
-
Az adatbázist és benne a táblákat
-
Aaaztaqrva (használd a kód mezőt "<>" jel) miért nem csinálod meg phpmyadminnal?
-
A teszt nem létezik. Nem egy adatbázis
-
Read the error gosh. Acelogs is not existinf