Skip to content
View in the app

A better way to browse. Learn more.

LCPDFR.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Need some basic coding help using RagePluginHook

Featured Replies

Hello fellow officers... i need some help if anyone has a moment, i am not new to coding gta so if you want to explain quickly, that is fine...

 

1. how do you attach ptfx smoke to an object?

 

2. how do you add ammo to a weapon in the ped inventory?

 

3. How do you spawn a police hat and sunglasses like they do in lspdfr?? (it is not a character variation I guess)

 

I am using the RagePluginHook but all I need to know is which native functions can do this or someone can give an example of the code?

 

thanks

  • Author

I have the weapon hash and want to add ammo to the weapon, i made this code but seems like a lot of extra work to do something so simple

 

Spoiler

                        if (pi.Weapons.Contains(weapon))
                        {
                            for (int i = 0; i < pi.Weapons.Count; i++)
                                if (pi.Weapons.Hash == weapon)
                                {
                                    pi.Weapons.Ammo += 10;
                                    break;
                                }
                        }

  weapon is a WeaponHash and pi is Game.LocalPlayer.Character.Inventory

Edited by jitsuin666

  • Author

ah yes ignored like always, nobody ever answers my coding questions haha why do i bother, i have helped people so much over the years showing them how to do fucking everything, make menus you name it... you all act like gta is some top secret shit and sharing information might mean another modder makes something better i dont know, is it a competitive thing... im just making a personal mod that i will not upload... just want to know some simple answers and you fuckers been coding gta for past 10 years and act like little snob fucks, guess what i knw what it takes to code, i know you are just a monkey that can make some garbage code, i know you fool all the little fucking kooks that think you are a hacker or someshit but i know you are an idiot, i know any monkey can learn... im too fucking lazy to go through lists of natives that all you lazy fucks havent organized into a library properly... if you made a proper sdk i wouldnt have to ask these questions... I guess you are trash oh well... i spit on you and your code patooie! LOL (and here come the responses to my thread toi simply talk shit... but when i was talking coding nobody would reply lol) go ahead come talk shit to me i welcome it, i know this post is going to rub sand in all your vaginas. Well I say good, fuck you!

 

i want a lspdfr dev to get in this fucking thread and tell me how to spawn the god damn police hat and glasses and i want to know NOW!!!!

Edited by jitsuin666

Going on a cursing rampage and demanding that you be assisted because you're oh so special is not how lcpdfr.com works. Everyone who helps out on these forums is volunteering their time and effort to help you with problems that have more than likely been resolved elsewhere and are accessible on Google. There is no secret agenda to set you back in doing things that are straight forward and naively supported by the game, and there most certainly is no obligation for anyone to help you at all.

 

The most ludicrous part of this response is that your tirade began a mere 4 hours after you posted this topic, not even a whole day passed. Since you're so adamant about having a proper SDK (which by the way, all three of your questions aren't even related to the LSPDFR API. RAGEPluginHook isn't a product of G17 Media), you surely can make your own extensions for RAGEPluginHook that do what you want how you want. Not good enough? Make your own hooking system that is everything you've ever dreamed of. If you are not up to such task, I strongly advise you to use resources such as Google and NativeDB and make do with the freely available systems that have been developed and made available for free. This topic will more than likely be locked due to your behavior.

 

P.S:  Being toxic is not going to magically make people help you (in case you haven't understood that part yet). Don't bother releasing anything on these forums if this is how you plan on acting. There are other places you can do that.

Edited by liverlande

  • Author

well i try to help people but i notice nobody helps me, this isnt my first thread asking how to spawn a police hat. The other day I showed someone how to make a menu, i wasted like 10-15 minutes explaining and even made example code for them and not even a thanks.

 

Do you know how to spawn the pllice hat and glasses... i think they look so very very cool and geee wouldnt it be nice if i can spawn them too 😄 but nah nobody cares about me, no one wants to help me, why do you care if i curse... let me curse at the clouds if it makes me feel better, nobody was ever going to come here and read it, nobody cares, it made me feel better typing it 😛

 

you see my avatar... that's an actual photo of me

Edited by jitsuin666

On 1/26/2019 at 1:33 PM, jitsuin666 said:

Hello fellow officers... i need some help if anyone has a moment, i am not new to coding gta so if you want to explain quickly, that is fine...

 

1. how do you attach ptfx smoke to an object?

 

2. how do you add ammo to a weapon in the ped inventory?

 

3. How do you spawn a police hat and sunglasses like they do in lspdfr?? (it is not a character variation I guess)

 

I am using the RagePluginHook but all I need to know is which native functions can do this or someone can give an example of the code?

 

thanks

Ok for a start 1: These are the natives for ptfx, this will make the purple clown appears smoke.
NativeFunction.Natives.REQUEST_NAMED_PTFX_ASSET("scr_rcbarry2");
NativeFunction.Natives.x6C38AF3693A69A91("scr_rcbarry2"); // _SET_PTFX_ASSET_NEXT_CALL
NativeFunction.Natives.START_PARTICLE_FX_NON_LOOPED_AT_COORD<uint>("scr_clown_appears", Game.LocalPlayer.Character.Position, 0, 0, 0, 5.5f, 0, 0, 0);

2: Why not just give a new weapon and set the amount of ammo there?IGame.LocalPlayer.Character.Inventory.GiveNewWeapon(WeaponHash.Pistol, 9999, true);

 

3: Why not use EUP Menu, That way you can choose,save & load your custom outfits with or without sunglasses , police hat ect...

19 hours ago, jitsuin666 said:

well i try to help people but i notice nobody helps me, this isnt my first thread asking how to spawn a police hat. The other day I showed someone how to make a menu, i wasted like 10-15 minutes explaining and even made example code for them and not even a thanks.

 

Do you know how to spawn the pllice hat and glasses... i think they look so very very cool and geee wouldnt it be nice if i can spawn them too 😄 but nah nobody cares about me, no one wants to help me, why do you care if i curse... let me curse at the clouds if it makes me feel better, nobody was ever going to come here and read it, nobody cares, it made me feel better typing it 😛

 

you see my avatar... that's an actual photo of me

 

Do you expect people to go through every post on these forums hourly? 😄 
Maybe joining the RPH Discord channel would be more appropriate.

ALSO, People care if you curse because your just wasting space in a post. 

Everyone has an opinion, People just need to learn there's a time and a place to voice it :). & Here is not it 😜 

Edited by 420Chuur

  • Author

oh im on the discord channel right now, they all are yelling at me right now and harassing me and bla bla bla... yeah but thank you for your response kind sir... i wasnt waiting just an hour but days and yes coders on here constantly, no one cares unless they need something

what is eup menu? im just making my own mod i dont plan to use anyone else's stuff... i prefer to make my own mods, the only mod i have downloaded is lspdfr

  • Author
3 hours ago, 420Chuur said:



2: Why not just give a new weapon and set the amount of ammo there?IGame.LocalPlayer.Character.Inventory.GiveNewWeapon(WeaponHash.Pistol, 9999, true);

 

 

i just wanted to do it the safes way possible, im not sure if i can give a weapon when i already have one and it just screws with gta's memory... just trying to play it safe and point at the weapon itself that already exists and set the ammo on it...it would be nice if we had something like ped.Inventory.GetWeapon(weaponHash).Ammo 😉

 

rph is calling the game natives and maybe the game natives are supposed to be used a certain way, unless you know for a fact otherwise... i use to code for iv with scripthook.net and you could mess up gta if you werent using natives right and get access violations left and right... rockstar doesnt program their native functions to check to make sure dev is using at correct time, they know how to use them, i dont, we all guess and look to decompiled scripts for example

Edited by jitsuin666

18 hours ago, jitsuin666 said:

i just wanted to do it the safes way possible, im not sure if i can give a weapon when i already have one and it just screws with gta's memory... just trying to play it safe and point at the weapon itself that already exists and set the ammo on it...it would be nice if we had something like ped.Inventory.GetWeapon(weaponHash).Ammo 😉

 

rph is calling the game natives and maybe the game natives are supposed to be used a certain way, unless you know for a fact otherwise... i use to code for iv with scripthook.net and you could mess up gta if you werent using natives right and get access violations left and right... rockstar doesnt program their native functions to check to make sure dev is using at correct time, they know how to use them, i dont, we all guess and look to decompiled scripts for example


You could use one of the natives,  ADD_AMMO_TO_PED(Ped ped, Hash weaponHash, int ammo), 

SET_PED_AMMO(Ped ped, Hash weaponHash, int ammo)


  • Author

you see those are exactly what i want to use, thank you kind sir... now about that police hat and glasses... is that like advanced hook stuff... lspdfr use only xD someone? help me i cant patrol streets without hat and glasses 😞

oh and thank you for the ptfx code, going to be testing that very soon 😉

 

you are an angel sent from heaven 😘

i dont have much to offer you but i do know how to summon the jew fairy

 

 

do you see how sad my police woman looks with no hat 😞

Edited by jitsuin666

5 hours ago, jitsuin666 said:

you see those are exactly what i want to use, thank you kind sir... now about that police hat and glasses... is that like advanced hook stuff... lspdfr use only xD someone? help me i cant patrol streets without hat and glasses 😞

oh and thank you for the ptfx code, going to be testing that very soon 😉

 

you are an angel sent from heaven 😘

i dont have much to offer you but i do know how to summon the jew fairy

 

 

do you see how sad my police woman looks with no hat 😞

 

Np, Although all the info I gave you can be found from google 😄 . You may want to take a look at this post here:  https://gtaforums.com/topic/808513-changing-ped-clothes-and-attaching-props-to-ped-via-scripts/, Down where it says props.

Edited by 420Chuur

  • Management Team

Instead of asking for handouts and complaining when you don't get them, why don't you try looking yourself? I don't code at all and it took me 5 minutes to find a native you can try for props. Most people who develop for GTA learn based on experimentation. Try something, if it doesn't work, try something else. Google is your friend. You won't learn anything new by asking for people to do the work for you.

 

image.png

"Work and ideas get stolen, then you keep moving on doing your thing."

  • Author

two angels now! xoxoxo im sorry im a pathetic lazy bastard but i have no more patience, i was searching, even i tried a million ways to attach ptfx, even copying the logic from game scripts and it would not work!! gta iv seemed more cooperative 😞

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.