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

Fast Sniper Switch (Awp Fast Switch)


Post New Thread Reply   
 
Thread Tools Display Modes
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 01-10-2011 , 17:19   Re: Fast Sniper Switch (Awp Fast Switch)
Reply With Quote #21

I can't answer because I don't know what you are talking about. Though, feel free to explain more what you mean exactly, how a player could "flood" etc. But If I try to reply more or less randomly, I would say all is depending what you do in the function.
__________________
Arkshine is offline
MPNumB
Veteran Member
Join Date: Feb 2007
Location: Lithuania
Old 01-10-2011 , 17:39   Re: Fast Sniper Switch (Awp Fast Switch)
Reply With Quote #22

Ok, for example you bought an awp. Now some dorky vip plugin tells you that you'r an freak, and that you should buy a vip (lets face it - that's mostly everything what vip plugins tell to everyone). So vip plugin coded by some starter forces you to drop a weapon in such a stupid way, what I cannot even think about, messing up original pattern of offsets and pdata. Therefor if it doesn't lead to some error log writings, it will lead of for modification of your player next attack offset what later due to that plugin can result in more problems and/or even crashes.

Yes, I know, if that's possible (and I truly don't think that it isn't), sooner or later I will get PMs telling me what a noob I am and stuff like that.

So therefor it's logical and reasonable that I ask: does probability of that increases or no if I'll use m_pPlayer instead of pev_owner (especially as you told me now that you know quite much about how weapon system works).

Cause I'm really tired of people trolling me, telling me things what they don't have a darn clue about. Even right now I have 9 pending steam friends requests, what I know eventually will be like this:
me: hello.
unknown person: hi
me: so whatsup?
unknown person: nothing
me: so why you added me?
(hour later)
me: hello?
unknown person: hey
me: so why you added me to your friends list?
unknown person: don't remember =P
me: has something to do with amxx coding?
unknown person: ow ya... you'r the guy who made that plugin?
me: yes, is something wrong
unknown person: yes, I removed it, cause there was a peroblem...
(some time after it all comes to that he either had old amxx version, or didn't had modules enabled, or some plugin messed things up, and after me being nice and trying to help him, proving that it's not plugin fault, he fails cause he doesn't known how to perform basic amxx installation stuff, calls me names, plays with my nerves, gives some words to his friends who believe him and eventually get contacts somewhere up high, so my reputation as a coder gets lower and lower and lower, and at the end I'm the bad stinking guy).
__________________
Skill and no annoying bugs with fixed balance issues is my goal!
My approved plugins what don't show up in Approved List:
* Bomb/Death/CSS Radar
* HotVision
___
Need help? Please check this documentation first.
MPNumB is offline
Send a message via Skype™ to MPNumB
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 01-10-2011 , 17:56   Re: Fast Sniper Switch (Awp Fast Switch)
Reply With Quote #23

Quote:
Ok, for example you bought an awp. Now some dorky vip plugin tells you that you'r an freak, and that you should buy a vip (lets face it - that's mostly everything what vip plugins tell to everyone). So vip plugin coded by some starter forces you to drop a weapon in such a stupid way, what I cannot even think about, messing up original pattern of offsets and pdata. Therefor if it doesn't lead to some error log writings, it will lead of for modification of your player next attack offset what later due to that plugin can result in more problems and/or even crashes.
Such offsets are anyway reseted on deploy, so that's not a problem.
__________________
Arkshine is offline
MPNumB
Veteran Member
Join Date: Feb 2007
Location: Lithuania
Old 01-10-2011 , 18:05   Re: Fast Sniper Switch (Awp Fast Switch)
Reply With Quote #24

Yes, but if there is a plugin what also uses deploy post and is listed earlier in plugins.ini and has for example engclient_cmd(id, "drop"), than more functions are called (those functions can be hooked and result in even more actions, and just to point out, if it calls next deploy, than that second deploy is still called after in the plugin, and anyway, it can result almost any weapon entity action). Therefor my question is, can any combination of those called functions result in a protection failuer or no?
__________________
Skill and no annoying bugs with fixed balance issues is my goal!
My approved plugins what don't show up in Approved List:
* Bomb/Death/CSS Radar
* HotVision
___
Need help? Please check this documentation first.
MPNumB is offline
Send a message via Skype™ to MPNumB
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 01-10-2011 , 18:18   Re: Fast Sniper Switch (Awp Fast Switch)
Reply With Quote #25

Sorry, I don't see how it could fail. The code executed is monothread, so such behavior can't exist. Though it won't hurt to put a check for safety, if weapon index is valid (pev_valid or ent_is_valid), which should be enough.
__________________

Last edited by Arkshine; 01-10-2011 at 18:26.
Arkshine is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 01-10-2011 , 18:23   Re: Fast Sniper Switch (Awp Fast Switch)
Reply With Quote #26

Let's see, if a plugin make the weapon drop, weapon still exists so it shouldn't be a problem, and pPlayer should be reset if weapon is correctly drop (engclient_cmd for example), but that's not your job to support badly coded plugins, anyway weapon still exist.
If a plugin remove the weapon, then a pev_valid() == 2 should be ok IMO.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
MPNumB
Veteran Member
Join Date: Feb 2007
Location: Lithuania
Old 01-10-2011 , 18:32   Re: Fast Sniper Switch (Awp Fast Switch)
Reply With Quote #27

Quote:
Originally Posted by Arkshine View Post
Sorry, I don't see how it could fail. The code executed is monothread, so such behavior can't exist. Though it won't hurt to put a check for safety, if weapon index is valid (pev_valid or ent_is_valid), which should be enough.
Ok, that's all I needed to know.
Quote:
Originally Posted by ConnorMcLeod View Post
Let's see, if a plugin make the weapon drop, weapon still exists so it shouldn't be a problem, and pPlayer should be reset if weapon is correctly drop (engclient_cmd for example), but that's not your job to support badly coded plugins, anyway weapon still exist.
If a plugin remove the weapon, then a pev_valid() == 2 should be ok IMO.
Ok. If you say so. Just... If weapon is removed pev_valid(iWeaponEntId)==2 ??? Shouldn't it be 0 or 1 (or just a KP mistyping)? =P
__________________
Skill and no annoying bugs with fixed balance issues is my goal!
My approved plugins what don't show up in Approved List:
* Bomb/Death/CSS Radar
* HotVision
___
Need help? Please check this documentation first.
MPNumB is offline
Send a message via Skype™ to MPNumB
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 01-10-2011 , 18:34   Re: Fast Sniper Switch (Awp Fast Switch)
Reply With Quote #28

0 on invalid entity
1 on entity is valid
2 on entity is valid and it has private data (safe to use pdata natives on).

EDIT : Here for you

Code:
static cell AMX_NATIVE_CALL amx_pev_valid(AMX *amx, cell *params) {     int idx = static_cast<int>(params[1]);     edict_t *e = INDEXENT(idx);     if (FNullEnt(e))         return 0;     if (e->pvPrivateData)         return 2;     return 1; }
__________________

Last edited by Arkshine; 01-10-2011 at 18:36.
Arkshine is offline
MPNumB
Veteran Member
Join Date: Feb 2007
Location: Lithuania
Old 01-10-2011 , 18:48   Re: Fast Sniper Switch (Awp Fast Switch)
Reply With Quote #29

Wau, that one I didn't know.

So in multyplayer game "player" entity on pev_valid will return 2, and on a single player (launch cs, open console, type "map de_dust2"), it will return 1, cause in that case scenario all pdata natives on a player entity result in an error log.
__________________
Skill and no annoying bugs with fixed balance issues is my goal!
My approved plugins what don't show up in Approved List:
* Bomb/Death/CSS Radar
* HotVision
___
Need help? Please check this documentation first.
MPNumB is offline
Send a message via Skype™ to MPNumB
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 01-10-2011 , 18:50   Re: Fast Sniper Switch (Awp Fast Switch)
Reply With Quote #30

I don't understand. You mean launching a listenserver (i doubt because can be 32 slots lol) ? I think it makes no difference (so i should doublecheck).
Also map command has never worked for me from listenserver.
__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 01-10-2011 at 18:54.
ConnorMcLeod 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:17.


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