
hipolitalakaj
Members-
Posts
53 -
Joined
-
Last visited
Everything posted by hipolitalakaj
-
Umm, I don't wanna be rude, you guys helped me a lot but which functions I need to make the attached object can aim and shooting if I press right / left mouse button?
-
That's it! lol, but I already tried this before I posted with the ID 25. Thanks.
-
Yes, I already did with the ID 12 too, but nothing changed.
-
Same, it's not attach it to my hand. Just creates the object where's my right hand
-
Still can't attach in my right hand (just creates the object where's my right hand but don't attach it in my hand) with bone_attach resource. function test() local x,y,z = getPedBonePosition(localPlayer, 25) local weapon = createWeapon("ak-47", x, y, z) setWeaponAmmo(weapon, 120) setWeaponClipAmmo(weapon, 32) setWeaponState(weapon, "firing") setElementAlpha(weapon, 0) local newAK = createObject(2965, x, y, z) exports['bone_attach']:attachElementToBone(weapon, newAK, 25, 0, 0, 0, 0, -90, 0) end addCommandHandler("aktest", test)
-
I don't want the full code. Just wants to know how to start with the bone_attach resource.
-
bone_attach do the same as attachelements if I'm right, so it's still just be an object. Can someone give me an example code of the weapon in the player hand and can aim+shoot? I can't figure out how to start.. I'm not a professional coder sorry. just need some skin on my server but I want to keep the original AK47 modell too.
-
Okay, now works. But at current state it's just an object and not in my hand + I can't use as weapon. I can't aim , shoot etc...How can I do that?
-
Thanks for your reply, now the weapon creates. But the object not and can't attach it to player. I got this error in debugscript: https://imgur.com/a/ICuMSA2
-
Hi! Can someone help me whats wrong with this code? Got these errors in debugscript: https://imgur.com/a/sVJd7yw function test() local weapon = createWeapon("ak-47") setWeaponAmmo(weapon, 120) setWeaponClipAmmo(weapon, 32) setWeaponState(weapon, "firing") setElementAlpha(weapon, 0) local newAK = createElement(object, 2965) attachElements(weapon, newAK) end addCommandHandler("aktest", test)
-
How to set AK-47 weapon properties to TEC-9?
hipolitalakaj replied to hipolitalakaj's topic in Scripting
Okay, I did the fire_speed with the anim_loop_start/stop and anim2_loop_start/stop properties, now just want one more thing, which is the anim. So just want to change the tec-9 anim's to the ak-47 anim when aiming and hold the weapon. Can someone help me how to do this? -
How to set AK-47 weapon properties to TEC-9?
hipolitalakaj replied to hipolitalakaj's topic in Scripting
Thanks for your help @MrTasty, yeah I did it with that method now (I just used skill level "poor" before that's why don't changed the dual hands...) And how can I set the tec9's fire speed as ak-47? It's possible to change hold the tec-9 anim like ak47? -
How to set AK-47 weapon properties to TEC-9?
hipolitalakaj replied to hipolitalakaj's topic in Scripting
Oh man, I don't wanna use 2 ak47 in hand... I just want to set tec9 to single hand if the tec9 skill level is pro... because the tec9 pro skill level is dual hands by default you understand? sorry, my english is s.ck ... -
How to set AK-47 weapon properties to TEC-9?
hipolitalakaj replied to hipolitalakaj's topic in Scripting
Ok, I trying to explain a bit more. I want to use tec-9 as ak-47. so I need to change all of tec-9 properties to ak-47 but my mind is blank now. I know that I need to use the SetWeaponProperty but I don't know full of the ak-47 properties. -
Or can I do this with the bone_attach script? I want to use dff and txd files.
-
I got the vehcicle id in which I've be (23) I'm trying to add to an eventhandler and get this error: attempt to to concatenate local 'v' (a table value) addEvent("tuning->Paintjob", true) addEventHandler("tuning->Paintjob", root, function(vehicle, paintjob) local result = dbPoll(dbQuery(mysql, "SELECT matrica FROM vehicle WHERE id=?", vehicle:getData("veh:id")), - 1) if(#result >= 1) then for i, v in ipairs(result) do outputChatBox("Result #"..i..": "..v) end else outputChatBox ( "No data were found that matching the query case" ) end end)
-
How to set AK-47 weapon properties to TEC-9?
hipolitalakaj replied to hipolitalakaj's topic in Scripting
I know that ak47 has it false by default, but I want to put ak skin to tec-9 and tec-9 use dual hands if the skill level is pro. So, I want to disable tec-9 dual hands. -
What do you mean? Can I use txd+dff files with shaders? or just images? like png
-
How can I set AK-47 weapon properties to TEC-9 (or to any other weapon)? Trying to set dual hand to false, but nothing changes if I type test. -- Server side -- function aktest(player) setWeaponProperty(32, "poor", "flag_type_dual", false) end addCommandHandler("test", aktest)
-
Nothing changes. I think something wrong. The code doesn't care the number in the matrica row... if I change the matrica row to 0 the script just say the output thing, if I change to 1,2,3 same. The matrica row type is int(2) if it matters.
-
Now I get nothing in chatbox if the matrica row value 1,2,3 or more ... and the paintjob applys.
-
I think it's possible, I saw that some servers already did it. But with shaders I can change the weapon models with just image (png) files which ugly... , right?
-
Thanks for your help! , now works without error in debugscript ,but still not working properly. Always says the outputchatbox thing "Előbb szedd le a matricát!" if the matrica row value is 0 in the vehicle table. I think you didn't get it what I want. I want to do when the matrica row value is 1,2 or 3 in the vehicle table then outputchatbox say "Előbb szedd le a matricát!" and ignore the update command. but if the matrica row value is 0 in the vehicle table then do the update command.
-
Hi! How can I get if the row value 1 then do something? local result = dbQuery("SELECT matrica FROM vehicle WHERE id=?", vehicle:getData("veh:id")) if(#result == 1) then dbExec(mysql, "UPDATE vehicle SET paintjob = ? WHERE id = ?", paintjob, vehicle:getData("veh:id")) else outputChatBox ( "Előbb szedd le a matricát!" ) end I get that warning in debugscript (so I think the script didn't get the vehicle id?!): Bad argument @ 'dbQuery'[Expected db connection at argument 1, got string 'SELECT matrica FROM vehicle WHERE id=?']
-
I want to use txd and dff files, not images like png for replace the original ak. It isn't possible to replace with txd and dff only for localplayer?