Raised This Month: $51 Target: $400
 12% 

[CS:S/CS:GO?] sm_<something> [Updating sm_weapons Kiske Give Weapons]


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
BallGanda
Junior Member
Join Date: Jan 2022
Old 12-22-2022 , 03:24   [CS:S/CS:GO?] sm_<something> [Updating sm_weapons Kiske Give Weapons]
Reply With Quote #1

[CS:S/CS:GO?] sm_<something> [Updating sm_weapons Kiske Give Weapons]

Hello. This is my first time with Pawn and I don't know any code language be gentle.

The request:
Looking for feedback on the code and changes so far. I don't know if my starting point was a good one. The code I have right now is "working" for CS:S for the features I have implemented. Limited to testing with me and the bots. Okay, I'll be straight with ya I didnt test nades and I'm sure that there is something funky with those all being in the same slot and my current slot entity present check code not differentiating between nade type. I hope I will be able to still fill in the missing data (-1s) in my entities table for CS:GO and have this plugin work for both...bit iffy on continuing CS:GO support as I'm not setup to test GO.

Why ask now when its not complete?

Why at all, there are plugins that sorta do this already?

Here is the plan from the Github page:
more credits thanks for the headstart

# This fork adds
- all the CS:S weapons that were missing to make CS:S compatible
- entity checking if player has a weapon/item in the slot the plugin is trying to give to.
- Drops and removes that weapon/item before giving new
- Code comments for days otherwise i have no clue whats going on
- Option to drop but not remove item from game
- Plugin engine checking
- Separate weapon/item lists per game would help on partial substr input for a few entities

commands plans


The code updating:
https://github.com/Ballganda/SourceM...ter/sm_give.sp

Last edited by BallGanda; 01-19-2023 at 10:54. Reason: updates to project scope
BallGanda is offline
BallGanda
Junior Member
Join Date: Jan 2022
Old 01-19-2023 , 13:20   Re: [CS:S/CS:GO?] sm_<something> [Updating sm_weapons Kiske Give Weapons]
Reply With Quote #2

I have this working pretty well in CS:S. With the features I added I think I may remove CS:GO support all together. I am not setup to test CS:GO and I do not have the slotID for all GO items.

It bugs me that I can not find a way in to get the weapon names and slotID from the game. I have hard coded the slot to the weapon name. I would prefer if on plugin start the data was collected from the game and stored in an array. The data is in the weapon_*.ctx files that the game reads in as the WeaponData. I have not found how to read weaon names and the slotID from files which is the parameter labelled "bucket". I have started looking at weapon attribute mods to see how they are modifying other data that originally from these weapon_*ctx files.

I also found this which has data I want. How was this info read/dumped?
https://wiki.alliedmods.net/CS_WeaponList_Message_Dump
Right know hardcoding is what I am doing.

The game is loading a weaponlist and weapondata. Would like to grab that data when the plugin loads once.

Worse but okay would be to get data after a map load once. maybe using CreateEntityByName Function... if you could only get weapon list then extract the data from each weapon entity and remove entity after.

Side note I just smiled and laughed when I found the weapondata name for slot was bucket. Seems like one of this early decisions that just stuck.

I hope I am just wrong and there is a way to get all the weaponlist names and weapondata with some SM functions.
__________________
BallGanda is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:40.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode