Posts: 62
Threads: 23
Joined: May 2013
Reputation:
0
Hey guys
I trust the most famous bag with a gun in the SAMP-for example, where the player has in his hand combat and the other player or give him buy sawnoff and his combat turns into sawnoff. Is there any one script against it? Thank you
Posts: 62
Threads: 23
Joined: May 2013
Reputation:
0
Can you give me a little better explain this to your code
Posts: 6,242
Threads: 8
Joined: Jun 2008
If you're talking of the arms dealer job in the GodFather script, then you're going to have to learn how to script..
It's a simple if statement, checking if the person who is being sold to has a gun, that conflicts (SPAS12/Sawnoff/Shotgun, AK47/Colt, SDPistol/Deagle) and this is SIMPLE coding.
Not to mention, you should have a /accept option, which in there, it should check what gun the person has, and check if they want to take the other gun.
Posts: 6,242
Threads: 8
Joined: Jun 2008
You'll need a variable assigned to each player, that tracks if they've been offered a weapon previously to stop others from coming in whilst the person is typing /accept, and offering a SDPistol/Shotgun so they take that instead of what they should've bought.
You'll also want to check what the player has in that slot to check if people are trying to hand out sd/shotty to people that have the higher weapons.
In the accept command you'd have to check if the player who offered is still online and whether or not they have enough materials to make/offer the weapon.
Really though, you are going to need to learn how to script rather than simply editting things to make it look like its yours. After all, it's obvious that you are working with the godfather script, and being that it's VERY old, you'd be best to learn from it only.
And even then, what you'd learn from it, is so outdated, that it'd be better to look at other gamemodes. (Vortex being a decent one that is a lot more updated than GF)
I'm not saying what you're doing is wrong, or bad, but it is a lot of work if you don't know how to script.
Sure, someone may come round, and paste up a solution, but you won't learn anything from that.