Jump to content

..:D&G:..

Members
  • Posts

    1,028
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by ..:D&G:..

  1. Hello, I am trying to make a report system that saved the reports in mysql, but I keep getting syntax error. I don't really know what the syntax for dbQuery is... local qh = dbQuery(mysql, "INSERT INTO reports (Date, Type, From, Content) values ('"..getFormatDate().."', '"..typ.."', '"..getPlayerName(client).."', '"..text.."');") local result = dbPoll(qh, -1 )
  2. Not to be mean, but you flamed a topic saying that your server is the best and that you are a good scripter, but you keep making topics asking for scripts, but you don't even try... I am not the only one telling you this -.-
  3. I've fixed it, it did that because I used createBlipAttachedTo and I've used createBlip and it works perfectly.
  4. Hello guys, I am making a trucker job and I want to display a blip for every marker where the truckers can go and pickup a truck, the problem is, that the blips are only visible from up close: markerIcon = createBlipAttachedTo(marker, 42, 2, 255, 0, 0, 255, 0, 65535) I even change the visibleDistance argument but still nothing...
  5. local nextXP = 50*level This means 50 divided by the level you have. So increase the 50 if you want the player to require more xp for a level, or decrease it if you want to have less.
  6. You need a special shader that does that, if you know how to do .fx shaders then go for it, I don't think someone will do it for you.. Maybe Ren will, but not sure, haven't seen him around for ages.
  7. Hello guys, I want to know how to remove the collision from an object created with createObject. I made a wanted system and a star on top of the wanted player. The thing is that if the player is in a vehicle and has a star, the car won't move as the star is stuck in the car. Thanks.
  8. addCommandHandler("drop", function(player) local x,y,z = getElementPosition(player) local weapon,ammo = getPedWeapon(player),getPedTotalAmmo(player) takeWeapon(player,weapon,ammo) pickup = createPickup(x+4,y,z+1,2,weapon,5000,ammo) end) function destroyPickup(thePlayer) destroyElement(pickup) outputChatBox("You picked up a weapon!", thePlayer, 255, 0, 0) end addEventHandler("onPickupHit", pickup, destroyPickup) "destroyElement is a function where you need to add the element that you want to destroy in the brackets "()"
  9. Hello there guys, I wanted to make tags for players that type in chat, like their ranks as admin and players, something like: [Veteran] PlayerName: Hello Message Is this possible without me needing to create a new chat function? Thanks.
  10. Hello, today someone entered my server and saw this: I never saw this thing before, and I want to know what it is, if he is somehow dangerous...
  11. Hello, I made this set wanted level function but I keep getting the error "Attempt to compare boolean with number". function setPlayerWanted(thePlayer, cmd, who, amountWanted) if isPlayerOwner(thePlayer) or isPlayerSuperMod(thePlayer) then if not (who) then outputChatBox("SYNTAXA: /"..cmd.." [Name] [Wanted]", thePlayer, 255, 255, 0) else local amountWanted = tonumber(amountWanted) local player = exports["(wG)Tools"]:findPlayer(who) if not amountWanted < 7 and not amountWanted > -1 then return else setElementData(who, "wantedPoints", amountWanted) end end end end addCommandHandler("setwanted", setPlayerWanted) Here is the error: if not amountWanted < 7 and not amountWanted > -1 then Even though I put a number when I type the command, and when I've defined "amountWanted" as a tonumber, it still reads it as a boolean... Any ideas what's wrong?
  12. Hello guys, I got this inventory system from community but I get an error when opening the inventory panel: local aktuel,oldaktuel = "Potte","Potte" function showInventar(teil) if(type(teil) == "string" and teil ~= "i") then aktuel = teil end unbindKey("i","down",showInventar) bindKey("i","down",destroyInventar) showCursor ( true ,false) toggleControl ( "fire", false) pClose,pMove,pReset = "images/closeinv.png","images/moveinv.png","images/reset.png" r,g,b = { ["Potte"]=110,["Taschen"]=110,["Keys"]=110,["Waffen"]=110, ["Rahmen"]=255} , { ["Potte"]=110,["Taschen"]=110,["Keys"]=110,["Waffen"]=110 ,["Rahmen"]=255} , { ["Potte"]=110,["Taschen"]=110,["Keys"]=110,["Waffen"]=110,["Rahmen"]=255 } slots = tonumber(getElementData(getLocalPlayer(),"Inventar_c")[aktuel.."Platz"]) lines = math.ceil(slots/7) bx,by = 330, 20 - 4 + 45*lines --543,266 if(not x and not y) then x,y = fx/2 - bx/2,fy/2 - by/2 end r[aktuel],g[aktuel],b[aktuel] = 0,255,0 r["o"..aktuel],g["o"..aktuel],b["o"..aktuel] = 0,255,0 local line local oline local platz for i=0,slots-1,1 do line = math.floor(i/7) if(line ~= oline) then platz = 0 end btn_inventar[aktuel][i] = guiCreateButton (x+10 + 40 * platz + 5 * platz,y+10 + 40 * line + 5 * line,40,40, i.."", false) guiSetAlpha(btn_inventar[aktuel][i],0) local id if( getElementData(getLocalPlayer(),"Item_"..aktuel.."_c") ) then id = getElementData(getLocalPlayer(),"Item_"..aktuel.."_c")[i.."_id"] if(id) then item[id]= { ["x"]= x+10 + 40 * platz + 5 * platz ,["y"]=y+10 + 40 * line + 5 * line } itemFront[id] = false end end if(not lockItemUseState[aktuel] or not lockItemUseState[aktuel][tonumber(i)]) then setItemRGB(i,110,110,110) end sitem[i]= { ["x"]= x+10 + 40 * platz + 5 * platz,["y"]=y+10 + 40 * line + 5 * line } oline = line platz = platz + 1 end btn_Potte = guiCreateButton (x+2,y-48,80.0,48.0, "", false) guiSetAlpha(btn_Potte,0) btn_Keys = guiCreateButton ( x+2 + 82,y-48, 80.0,48.0, "", false ) guiSetAlpha(btn_Keys,0) btn_Taschen = guiCreateButton ( x+2 + 82*2,y-48, 80.0,48.0, "", false ) guiSetAlpha(btn_Taschen,0) btn_Waffen = guiCreateButton ( x+2 + 82*3,y-48, 80.0,48.0, "", false ) guiSetAlpha(btn_Waffen,0) btn_Close = guiCreateButton ( x+bx + 1,y-49, 18,18, "", false ) guiSetAlpha(btn_Close,0) btn_Move = guiCreateButton ( x+bx + 1,y-49+18, 18,18, "", false ) guiSetAlpha(btn_Move,0) btn_Reset = guiCreateButton ( x+bx + 1,y-49+36, 18,18, "", false ) guiSetAlpha(btn_Reset,0) addEventHandler("onClientMouseEnter",getRootElement(),onButtonInvEnter) addEventHandler("onClientMouseLeave",getRootElement(),onButtonInvLeave) addEventHandler("onClientGUIClick",getRootElement(),onInvClick) addEventHandler("onClientMouseEnter",getRootElement(),onItemMouseOver) addEventHandler("onClientMouseLeave",getRootElement(),onItemMouseLeave) addEventHandler("onClientGUIClick",btn_Close,onCloseClick) addEventHandler("onClientGUIMouseDown",btn_Move,onMoveClick) addEventHandler("onClientGUIMouseUp",btn_Move,onStopMove) addEventHandler("onClientGUIClick",btn_Reset,onResetClick) addEventHandler("onClientGUIMouseDown",getRootElement(),onClickAndDropDown) addEventHandler("onClientGUIMouseUp",getRootElement(),onClickAndDropUp) addEventHandler("onClientRender",getRootElement(),renderInventar) end I get an attempt to index a boolean value here: slots = tonumber(getElementData(getLocalPlayer(),"Inventar_c")[aktuel.."Platz"]) Any ideas what's wrong with it?
  13. Hello guys, I got this inventory system from community and it saves in MySQL, but I want to make it save in SQLite. I found this function: mysql_ping which seams to be from the MySQL module, what's the replacement of this function for SQLite? Thanks.
  14. Lol, I always think of noobish way to do them, and look stupid may I know what this means? end, (i-1)*5000, 1, v );
  15. Ok, I did what you said and got this: elseif ( source == Inter.btn.downloadAll ) then for i, v in pairs ( Inter.rows ) do local row = unpack(v) local name = guiGridListGetItemText ( Inter.grid.list, row, 1) local dtxd = Downloader.Mods[ name ].txd local ddff = Downloader.Mods[ name ].dff triggerEvent("startDownloadModSelected", root, dtxd, ddff) Inter.refresh ( ); end The thing is that MTA freezes as it downloads all the mods at the same time. How can I make the mods add to the download at an interval of 5 seconds? What I mean is, how can I get each row at an interval of 5 seconds? I was thinking of setTimer but it doesn't seem to be the right thing to do
  16. Lol, didn't think about that thanks
  17. Hello, I got a quick question, how do I get all the rows from a gridlist? I got this gridlist: Inter.grid.list = guiCreateGridList(9, 181, 452, 369, false, Inter.window) and I want to get all the rows instead of using: local row, _ = guiGridListGetSelectedItem ( Inter.grid.list );
  18. This only sets the animation, thanks for trying to help me tho
  19. Is that script even supposed to work? WTF is this? AddEventHandler ( "piss",piss ) if anim = "piss" == PAULNMAC = piss end function setTimer = 300000 outputchatbox ( "Deine Blase füllt sich such dir ein Platz und entleere sie!" getRootElement(), 200, 0, 0 ) end AddCommandHandler ( "piss",piss_func )
×
×
  • Create New...