Raised This Month: $ Target: $400
 0% 

Questions about scripting and HL engine


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
OlikA
Junior Member
Join Date: Aug 2009
Location: Caldeum
Old 08-18-2009 , 16:30   Questions about scripting and HL engine
Reply With Quote #1

Hi , I'm new to this plugin making thing . I started it maybe a week ago, learned from the funcwiki, the amxmodx doc and other plugins source code [and hlsdk for possibilities] . However I have some questions that i couldn't find answer by searching the forum (maybe lack of keywords) .

1 - Optimization

I couldn't find the "basics" of Pawn language regarding the optimizing. I read that "very-frequent" (0.01s) tasks should be redone in server_frame; saw from source codes that i should use constants for regular expressions etc. But i would like to know more optimization. For example, should I use only one public function that can do two or more thing (IF/switch/etc) or write more public function and each will deal with that specific/unique event. Or the "perfect" number of used modules, what module-functions should I use for fast performance etc etc etc.
Response by Bad_Bud: http://wiki.amxmodx.org/Optimizing_Plugins_(AMX_Mod_X_Scripting)

2 - Pev_button
I made a little plugin, that allows me to control an entity with pev(id1, pev_origin, origin1) and set_pev(id2, pev_origin, origin1). And I tried to do a "real" control by pev_button, but pev(id1, pev_button, button1) set_pev(id2, pev_button, button1) doesn't seems to work. If you want, I'll post the code (the question is about the pev_button, not that what is the problem with my plugin).
Here is the source code: https://forums.alliedmods.net/showpo...2&postcount=10

3 - Detailed informations about the constants
I couldn't find anywhere that how should I get the name of the "being spectated" player, later I found it in the specinfo plugin. But why is not there in the *.inc files (I mean the purpose of that specific "value")? So is there any list with all of these constants? Even the HLSDK [not full] has these informations placed recklessly in random header files.

4 - Short and easy questions

A: Is there a specific user message or an event that "fires" when someone fires/attacks/is about to deal damage? I would like to get that very moment, when someone is about to give a shot () or slashing with knife [and maybe using a stationary gun]. I tried the AmmoX event, but it doesn't works.
Response by ot_207: https://forums.alliedmods.net/showpo...92&postcount=9

B: Can I "disable" specific events/messages/functions? I read that there's a function that allows to "stop" it, or at least my plugin has the right to do the first steps and then the real event/message/function will be parsed/run, but I can't find it [lack of keywords].
Response by ot_207: https://forums.alliedmods.net/showpo...61&postcount=3 (end of post)

This was my first post. Sorry for making it rather long. I just simply have many ideas that I would like to realize. I hope i didn't asked anything dumb or so noobish.

Last edited by OlikA; 08-18-2009 at 17:31.
OlikA is offline
 


Thread Tools
Display Modes

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 15:06.


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