micheal1230
Members-
Posts
390 -
Joined
-
Last visited
Everything posted by micheal1230
-
Well The Pickup Aint Showing Server: local pickup = createPickup(361.162109375, 171.3984375, 1008.3828125, 3, 1239, 0.1) setElementDimension(pickup, 2) setElementInterior(pickup, 3) addEventHandler("onPickupHit", pickup, function () triggerClientEvent ( "show", getRootElement(), player ) end ) Client: local changenameped = createPed(57,359.1533203125, 172.3720703125, 1008.3828125) setPedRotation(changenameped, 267) setElementDimension(changenameped, 2) setElementInterior(changenameped, 3) setElementData(changenameped, "name", "Joe Micheals") setElementFrozen(changenameped, true) GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Window1 = guiCreateWindow(568,320,209,113,"Change Name Form",false) GUIEditor_Label1 = guiCreateLabel(29,29,157,24,"Format: Firstname_Lastname",false,GUIEditor_Window1) guiLabelSetColor(GUIEditor_Label1,255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label1,"top") guiLabelSetHorizontalAlign(GUIEditor_Label1,"left",false) GUIEditor_Edit1 = guiCreateEdit(29,50,155,18,"",false,GUIEditor_Window11) GUIEditor_Button1 = guiCreateButton(61,82,83,21,"Change Name",false,GUIEditor_Window1) function hidename() guiSetVisible(GUIEditor_Window1, false) guiSetVisible(GUIEditor_Label1, false) guiSetVisible(GUIEditor_Edit1, false) guiSetVisible(GUIEditor_Button1, false) showCursor ( false ) end addEventHandler( "onClientResourceStart", getRootElement( ), hidename) addEvent("show", true) addEventHandler( "show", getRootElement(), function () guiSetVisible(GUIEditor_Window1, true) guiSetVisible(GUIEditor_Label1, true) guiSetVisible(GUIEditor_Edit1, true) guiSetVisible(GUIEditor_Button1, true) showCursor ( true ) end )
-
Come on my server you try and do it no one else can do it only me for some reason
-
It only works for me now No one else can use it
-
Mate is doesnt work Clientside -- Suitcase Script case = createObject(1210,0,0,0) --(object,attachto,bone,x,y,z,rx,ry,rz) local case = createObject(1210,0,0,0) --(object,attachto,bone,x,y,z,rx,ry,rz) addEvent("suitcase", true) function case(player) exports.bone_attach:attachElementToBone(case,player,12,0,0.1,0.3,0,180,0) case = createObject(1210,0,0,0) --(object,attachto,bone,x,y,z,rx,ry,rz) end addEventHandler ( "suitcase", getRootElement(), case ) addEvent("removesuitcase", true) function removebriefcase(player) case = createObject(1210,0,0,0) --(object,attachto,bone,x,y,z,rx,ry,rz) exports.bone_attach:detachElementFromBone(case) moveObject(case, 1 ,0 ,0 ,0) end addEventHandler ( "removesuitcase", getRootElement(), removebriefcase ) Serverside -- Suitcase Commands addCommandHandler("suitcase", function() triggerClientEvent ( "suitcase", getRootElement(), case ) end ) addCommandHandler("removesuitcase", function() triggerClientEvent ( "removesuitcase", getRootElement(), removebriefcase ) end )
-
No Errors just you dont get the suitcase Client Side: -- Suitcase Script case = createObject(1210,0,0,0) --(object,attachto,bone,x,y,z,rx,ry,rz) addEvent("suitcase", true) function case(player) exports.bone_attach:attachElementToBone(case,player,12,0,0.1,0.3,0,180,0) end addEventHandler ( "suitcase", getRootElement(), case ) addEvent("removesuitcase", true) function removebriefcase(player) exports.bone_attach:detachElementFromBone(case) moveObject(case, 1 ,0 ,0 ,0) end addEventHandler ( "removesuitcase", getRootElement(), removebriefcase ) The Resource Bone_Attach Description On MTA Community ServerSide: -- Suitcase Commands addCommandHandler("suitcase", function() triggerClientEvent ( "suitcase", getRootElement(), case ) end ) addCommandHandler("removesuitcase", function() triggerClientEvent ( "removesuitcase", getRootElement(), removebriefcase ) end )
-
Here is my script local private1 = createColPolygon(111.7880859375, 1336.2998046875, 110.7744140625, 1484.421875, 287.123046875, 1484.427734375, 288.1416015625, 1336.296875, 111.7900390625, 1336.2958984375) local theTeam = getTeamFromName("Fort Carson Police Department") local teamMembers = getPlayersInTeam(theTeam) function privatejames(thePlayer, matchingDimension) for key, value in ipairs(teamMembers) do outputChatBox("[RADIO] This is dispatch, We've have seen someone on James Brandon's Compound, Over.", value, 0, 183, 239) outputChatBox("[RADIO] Detain Him On Site, Over.", value, 0, 183, 239) end end addEventHandler("onColShapeHit", private1, privatejames)
-
mate i mean i want to remove the element from the player so is disappears but only for that player everything i have done so far removes it from existent or removes it from everyone on the server
-
Well I Have Tried To Use DetachElement But that just leaves it floating where you do the command and if you destoryElement It Perm. Deletes It Forever Till Script Restart
-
Ok But Any Idea How To Destroy The Suitcase I Have Tryed destroyElement( case ) And DetachElementFromBone Or Whatever its called But It Doesnt Work.
-
Ok lemme try this And Montiz I mean Like The Object Like A Suitcase did you use the resource?
-
Could Someone Tell me How To Attach The Item To The Player I Have Tried And The MTA Community Description Only Tells You How To Attach It To Peds AKA NPCs/Bots Whatever But In The Video He Provides He Shows You That You Can Have It Attached To A Player but He Doesnt State How Resource: https://community.multitheftauto.com/index.php?p=resources&s=details&id=2540 Video:
-
Did you get the resource working? or did you script frames ? if you didnt script frames could you maybe tell me how to get the resource to work?
-
Yep
-
Here is my script i doesnt work too well, i cant get the rotation to set and it doesnt lock the the hand bone so when you walk it floats next to you but its still a start function suitcase(source, commandName) local x, y, z = getElementPosition ( source ) local attachedElements = getAttachedElements local case = createObject(1210, x + 0.2, y, z , 0, 0, 0) if exports.global:hasItem(source, 157) then attachElements ( case, source, 0.2, 0, 0, 0, 0, 0) exports.global:sendLocalMeAction(source, "out a briefcase and start's to carry it.") end end addCommandHandler("suitcase", suitcase)
-
Attempt to get local result a bootlean value
-
same error
-
Yep It Works For Me But Can We Try And Stay On Topic Im Trying To Fix This MYSQL Problem Any Idea's?
-
https://community.multitheftauto.com/index.php?p= ... ls&id=2540 https://wiki.multitheftauto.com/wiki/AttachElements 1:38 for suitcase Tank Hat From Wiki function tankHat ( source, commandName ) local x, y, z = getElementPosition ( source ) --Get the players position local tank = createVehicle ( 432, x, y, z + 5 ) --Create a tank attachElements ( tank, source, 0, 0, 5 ) --Attach the tank to the player. end addCommandHandler ( "hat", tankHat ) Edit: Might Use This Resource For Myself Edit 2: Cant Get The Resource To Work For Me Edit 3: The Resource Does Work I Just Fail
-
I removed the extra end but you still get the (generator) expected table got nill error but at like 60 instead
-
expected ")" @ Line 67 To Close "(" @ Line 57 Near 'end'
-
Well Here Is The Error Everything Else Works Serverside: mysql = exports.mysql local pInfo = createPickup ( -204.19921875, 1116.7587890625, 19.7421875, 3, 1239 ); -- create marker addEventHandler ( "onResourceStart", resourceRoot, function ( ) addEventHandler ( "onPickupHit", pInfo, fnShow ); -- add handler of event 'onPickupHit' to fn 'fnShow' addCommandHandler ( "createinfo", fnCreateInfo ); -- add command 'createinfo' to fn 'fnCreateInfo' end ) function fnShow ( pPlayer ) outputChatBox ( "Welcome to Fort Carson Roleplay Server!", pPlayer ); -- output on chat some text outputChatBox ( "Our Forums Address Is mtafcrp.freeforums.org", pPlayer ); cancelEvent(); end function fnCreateInfo ( pPlayer, chCommand, ... ) if ( ... ) then if ( exports['global']:isPlayerAdmin ( pPlayer ) ) then local nX, nY, nZ = getElementPosition ( pPlayer ); local chText = table.concat ( { ... }, " " ); pInfoPickup = createPickup ( nX, nY, nZ, 3, 1239, 0.1 ); setElementData ( pInfoPickup, "Message", chText ); setElementData ( pInfoPickup, "PosX", nX ); setElementData ( pInfoPickup, "PosY", nY ); setElementData ( pInfoPickup, "PosZ", nZ ); addEventHandler ( "onPickupHit", pInfoPickup, infohit ); fnSaveInfo(); end else outputChatBox ( "SYNTAX: /" .. chCommand .. " [iNFO]", pPlayer, 255, 194, 14 ); end end function fnSaveInfo ( ) local message = getElementData ( pInfoPickup, "Message" ); local posx = getElementData ( pInfoPickup, "PosX" ); local posy = getElementData ( pInfoPickup, "PosY" ); local posz = getElementData ( pInfoPickup, "PosZ" ); exports['mysql']:query_free ( "INSERT INTO `infopoints` ( posx, posy, posz, message ) VALUES ( '" .. exports.mysql:escape_string(posx) .. "', '" .. exports.mysql:escape_string(posy) .. "', '" .. exports.mysql:escape_string(posz) .. "', '" .. exports.mysql:escape_string(message) .. "' )" ); end function infohit(thePlayer) local message = getElementData( infopointpickup,"Message") outputChatBox("" .. message .."",thePlayer) end addEventHandler("onResourceStart",resourceRoot, function () for index, infopointpickup in pairs do exports['mysql']:query_free("SELECT * FROM infopoints") do fnCreateInfo(infopointpickup["posx"], infopointpickup["posy"], infopointpickup["posz"], infopointpickup["message"]) end end end)
-
This is nothing to do with how to load tables
-
i Did want it for everyone since only my admins know the command only they can do it
-
Could Someone Just tell me how to load stuff and why it doesnt save the x y and z?
-
Lol Mate I Want People To Be Able To Customize There CJ Skin not Give Them A Helmet
