Jump to content

Phoenix-Roleplay

Members
  • Posts

    92
  • Joined

  • Last visited

Details

  • Gang
    Phoenix Games

Phoenix-Roleplay's Achievements

Punk-@ss B*tch

Punk-@ss B*tch (12/54)

0

Reputation

  1. Resolved. Needed to do a work around and pull the data like so: local respPosT = {0,0,0,0,0,0} local respPos = getElementData(theVehicle, "respawnposition") if (type(respPos) == "table")) then respPosT = respPos end local x, y, z, rx, ry, rz = unpack(respPosT)
  2. Not sure if you fully understood me but I did a outputDebugString and it returned the table outputDebugString(x.." "..y.." "..z.." "..rx.." "..ry.." "..rz)
  3. Somehow this does not want to unpack properly yet, does at the same time.. local resppos = getElementData(theVehicle, "respawnposition") local x, y, z, rx, ry, rz = unpack(resppos) What I mean by this is, if I debug and tell it to output: "outputDebugString(x.." "..y.." "..z)" it outputs all the data. I even did if not x or not y or not z or not rx or not ry or not rz then outputDebugString("This is the issue here.") end and nothing was output so I put else outputDebugString("This is somehow the issue.") end and it output the data there. And when I look at the debug in game without any other debug I get this ERROR: bad argument #1 to 'unpack' (table expected, got boolean)
  4. Right. And thats all I want it to do, is work for the commands I have scripted.
  5. Yep, I know. My server doesn't use the ACL so much, it uses a SQL to check for admin. It's a completely seperate basis for the server.
  6. Simple problem, I am not familiar with using executeCommandHandler nor working with using "..." but it just fails to execute everytime. local execcmd = nil function executeCommand(thePlayer, commandName, exeCmd, targetPlayer, ...) if(exports.global:isPlayerOwner(thePlayer))then if not (exeCmd) or not (targetPlayer) then outputChatBox("Syntax: /"..commandName.." [player id] [cmd name] [arguments]", thePlayer, 255, 0, 0) return end if(...)then execcmd = executeCommandHandler(exeCmd,targetPlayer,...) if(execcmd)then outputChatBox("Command Execution successful!", thePlayer, 0, 255, 0) else outputChatBox("Command Execution failed!", thePlayer, 255, 0, 0) end else execcmd = executeCommandHandler(exeCmd,targetPlayer) if(execcmd)then outputChatBox("Command Execution successful!", thePlayer, 0, 255, 0) else outputChatBox("Command Execution failed!", thePlayer, 255, 0, 0) end end else outputChatBox("This.",thePlayer,255,0,0) end end addCommandHandler("exec", executeCommand)
  7. Thanks so much qais you helped me perfectly! Could not have been any better or any quicker! I will definitely be in contact with you again if I need more work!
  8. OK. So I am not exactly sure the issue here, but it fails to show the photo to anyone. Client: addEvent("onMyClientScreenShot",true) addEventHandler( "onMyClientScreenShot", resourceRoot, function( pixels ) if image then destroyElement(image) end image = dxCreateTexture( pixels ) daPic() end ) --local screen = dxCreateScreenSource ( 340, 380 ); local sWidth,sHeight = guiGetScreenSize() function daPic() dxUpdateScreenSource(image); addEventHandler("onClientRender", root, showSpeedPic) setTimer(removeDaAnnoyingThingy, 5000, 1); end addEvent("showPicture", true) addEventHandler("showPicture", getLocalPlayer(), daPic) function showSpeedPic() rect = dxDrawRectangle(20.0,209.0,295.0,255.0,tocolor(0,0,0,140),false) dxDrawImage( 28.0,217.0,279.0,238.0, image) end function removeDaAnnoyingThingy() removeEventHandler("onClientRender", root, showSpeedPic) end -------------------------------------------------- --[[ Show image addEventHandler( "onClientRender", root, function() if image then rect = dxDrawRectangle(20.0,209.0,295.0,255.0,tocolor(0,0,0,140),false) dxDrawImage( 28.0,217.0,279.0,238.0, image) setTimer(removeDaAnnoyingThingy, 5000, 1); end end )]] function getScreenSize(value,thePlayer) local x,y = guiGetScreenSize() triggerServerEvent("takePicture",getLocalPlayer(),value,thePlayer,x,y) end addEvent("getScreenSize",true) addEventHandler("getScreenSize",getRootElement(),getScreenSize) Server: function takePicture(value,thePlayer,x,y) takePlayerScreenShot(thePlayer,x,y,"speedcam",100) end addEventHandler( "onPlayerScreenShot", root, function ( theResource, status, pixels, timestamp, tag ) triggerClientEvent( root, "onMyClientScreenShot", resourceRoot, pixels ) -- Relay to all players end ) And I have added triggerClientEvent("getScreenSize",getRootElement(),value,thePlayer)
  9. Hello MTA, I have another small issue on my hand, but not so much an issue. Using dxCreateScreenSource is there a way to transmit the taken image from one clients screen and send the same image to other players? I am working on a speedcam that takes a photo of the player who sped and want to transit the image to every police on duty, the image displays to all police and to the violator only the police receive an image of themselves.
  10. Are kidding me Liam! Of course I remember you! You need to add me on Skype, I rarely get on Facebook or anything anymore. Thanks so much by the way! Take care. Regards, Chris Canfield
  11. This thread is getting interesting...
  12. Hey MTA! I just was toying around with Fraps and Windows Live Movie Maker, and I decided to make a video for a friend who has a car mod and showing my roleplay server under development. Thoughts and suggestions for my next video?
  13. @Cadu, can you send me a SS of what it displays IG? EDIT: Wait, nevermind I got it fully functional now using the fetch_assoc! Thanks so much everyone, special thanks to Cadu!
  14. I'll try that but if I am not mistaken, the row = mysql_fetch_rows should do that for me? EDIT: Yea, same problem. Doesn't seem to withdraw the date from row["admin"]
  15. Interesting find, pasted the EXACT code and I get this ERROR: pf\s_main.lua:17: attempt to index local `row` (a nil value) EDIT: Upon further inspection, row["admin"] is failing to be set at all.
×
×
  • Create New...