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

[CSS] Moving From Amxmodx Pawn To Sourcepawn And Many Ohter Questions.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
.Dare Devil.
Veteran Member
Join Date: Sep 2010
Old 02-03-2012 , 05:14   [CSS] Moving From Amxmodx Pawn To Sourcepawn And Many Ohter Questions.
Reply With Quote #1

Hello!


I saw something different in source pawn and i wanna know what they are.



1.
PHP Code:

pluginstart
()
RegConsoleCmd("say"Command_Say);

Action:Command_Say(clientargs
why is that Action: here?
Quote:
Action:, Handle: and Replysource: are tags. They are kind of like types (more or less) and indicate what "type" the function returns (case 1) or variable is (case 2). Tags are either built into the compiler (such as String: and Float: ) or are defined as enums, usually in .inc files (ALL the one defined by SourceMod itself are definitely defined in the .inc files found in the scripting/include directory -- Action is defined in core.inc, Handle is defined in handles.inc and ReplySource is defined in console.inc).

Also: http://wiki.alliedmods.net/Tags_(Scripting)


2.
PHP Code:
Handle:g_Cvar_Needed INVALID_HANDLE
Quote:
Action:, Handle: and Replysource: are tags. They are kind of like types (more or less) and indicate what "type" the function returns (case 1) or variable is (case 2). Tags are either built into the compiler (such as String: and Float: ) or are defined as enums, usually in .inc files (ALL the one defined by SourceMod itself are definitely defined in the .inc files found in the scripting/include directory -- Action is defined in core.inc, Handle is defined in handles.inc and ReplySource is defined in console.inc).

Also: http://wiki.alliedmods.net/Tags_(Scripting)


3.
PHP Code:
decl String:text[192]; 
why not new text[192]?
is that means that when i do new text[192] then i can not add any string inside of it?
( Example: text[0] = '/' )
Quote:
After reading that: http://wiki.alliedmods.net/Introduction_to_SourcePawn
Now string variables must have String: tag like Float: have.

new create a variable and initializes the entire value with zeros (similar to Java).
decl declares a variable, but does not initialize it (similar to C and C++) which is slightly faster, especially for large arrays.


4.
PHP Code:
new ReplySource:old 
what does that means "replysource" also where are those things list?
Quote:
Action:, Handle: and Replysource: are tags. They are kind of like types (more or less) and indicate what "type" the function returns (case 1) or variable is (case 2). Tags are either built into the compiler (such as String: and Float: ) or are defined as enums, usually in .inc files (ALL the one defined by SourceMod itself are definitely defined in the .inc files found in the scripting/include directory -- Action is defined in core.inc, Handle is defined in handles.inc and ReplySource is defined in console.inc).

Also: http://wiki.alliedmods.net/Tags_(Scripting)

5.
PHP Code:
public Plugin:myinfo =
{
    
name "Client Preferences",
    
author "AlliedModders LLC",
    
description "Client peferences and settings menu",
    
version SOURCEMOD_VERSION,
    
url "http://www.sourcemod.net/"
}; 
How is that possible that you can give for functions a values?
What this function do? name, author are variables or params?
Quote:
That is not a function, it is an array used to simulate a structure using an enum to define the "fields".
name and author are values defined in the Plugin: tag/enum.

6.
Is there anything more that is new in sourcepawn and is not in amxmodx pawn?

7.
There are messages in amxmodx example:
message_const.inc
PHP Code:
#define TE_DLIGHT                   27       // Dynamic light, effect world, minor entity effect
// write_byte(TE_DLIGHT)
// write_coord(position.x)
// write_coord(position.y)
// write_coord(position.z)
// write_byte(radius in 10's) 
// write_byte(red)
// write_byte(green)
// write_byte(blue)
// write_byte(brightness)
// write_byte(life in 10's)
// write_byte(decay rate in 10's) 
Where are source messages?

8.
What are source limits?

1. Entities what can engine handle/render?
( Example in cs1.6 if you having more than 300 entities with model and you make one more then you cant see it )
2. Maximum entities that server can have, in cs1.6 there are 1370 something and one more = crash?
Quote:
2048
3. Is there dynamic light limited? In cs1.6 dynamic light messages can be someting 60 at once?
4. Precache limits, how many can you precache models, sounds, generics. In cs1.6 512?
5. How many hudmessages can be screen at once?
Quote:
Creates a HUD synchronization object. This object is used to automatically assign and re-use channels for a set of messages. The HUD has a hardcoded number of channels (usually 6) for displaying text. You can use any channel for any area of the screen. Text on different channels can overlap, but text on the same channel will erase the old text first. This overlapping and overwriting gets problematic. A HUD synchronization object automatically selects channels for you based on the following heuristics: - If channel X was last used by the object, and hasn't been modified again, channel X gets re-used. - Otherwise, a new channel is chosen based on the least-recently-used channel. This ensures that if you display text on a sync object, that the previous text displayed on it will always be cleared first. This is because your new text will either overwrite the old text on the same channel, or because another channel has already erased your text. Note that messages can still overlap if they are on different synchronization objects, or they are displayed to manual channels. These are particularly useful for displaying repeating or refreshing HUD text, in addition to displaying multiple message sets in one area of the screen (for example, center-say messages that may pop up randomly that you don't want to overlap each other).
6. How many tga/spr can be in screen at once?



9.
Weapons

1. Can we block weapon fire sounds and if yes then how?
2. Can we do that client have non weapon.
He can not shoot or nothing. It is for that that i want to do all weapon by my own.

3. Traceline, in amxmodx we can do traceline Its needed for weapon shoot.
with traceline we enter angles where to shoot line then and if it touch something then get end origin and if it touch entity then entity index.
4. Is there someway possible to make your own v_ model system somehow?
Example i make new entity, give him v_ model and set entity follow player and it will be always exactly in same position in screen like default view model is.
5. p_ model "Player weapon model", is there possible to change model like i wanted to?
6. how to check buttons like "ATTACK1"(mouse1), "ATTACK2"(mouse2), "USE" (e), "DROP" (g)?
7. is there possible to play 3d sound without creating a entity and emit sound?
( Its for weapon fire sound and end fire origin hit sound. )



10.
Entities

1. All entity holds data like origin, velocity and such stuff. How to set or check them and where i find list where are all entity pev data?
2. in goldsource there are forward pfn_keyvalue(entid). If engine load bsp entities then by this forward you can get entity index, keyname, value. Is there any similar forward in source?
3. there are such forwards in amxmodx like touch - called when entity touch something and have 2 params, entid - touchedentid. Is there any similar forward in source?
4. Entity thinking forward, called every time when entity thinks and params are only entid. Is there any similar forward in source?



11.
Players

1. Every player have name, hp, armor. How can i check them?
Quote:
After reading that: http://docs.sourcemod.net/api/
To get hp: GetClientHealth(client) // return hp value
To get armor: GetClientArmor(client) // return armor value
To get name: GetClientName(client, String:name[], maxlen);
All other thing are here http://docs.sourcemod.net/api/ in clients selection/inc
2. Is there possible to hide all player huds ( radar, hp, time etc... ) when yes, then how?
3. how can we change player view angles?
4. Is there possible to change view fov, if yes then how?
Quote:
PHP Code:
SetEntProp(clientProp_Send"m_iFOV"Value); 
Default value of 'm_iFOV' = 90


12.
Players & Entities

1. How to get entity or player water level?
Quote:
PHP Code:
stock GetWaterLevel(client)
{
   return 
GetEntProp(clientProp_Send"m_nWaterLevel");
}

// 0 - not in water
// 1 - feet
// 2 - body (you can jump from now on)
// 3 - head 


PS: Inside Of Quote Is Solution
This thread is knowledge library. If i found out how or someone answer to my question then i update thread and add that information in main post so it will be easy to ohters learn things.
Also there are new questions coming in this thread but for now im trying to get those.

I decided that fzp (My big project) will come to source engine.
First idea was that i create one big project to cs1.6 and then for source but nonono no, human life is too short.
I would be very grateful if you find sometime and reply with solution.
Please if youre not sure or dont know exactly please dont reply with wrong solution, it will confuses.

-DareDevil

Last edited by .Dare Devil.; 09-29-2012 at 20:37. Reason: like a new thread, better.
.Dare Devil. is offline
-Absolute-
Member
Join Date: Mar 2010
Old 02-03-2012 , 11:05   Re: Some questions about source pawn.
Reply With Quote #2

I'm not that good in SourcePawn, so I can only tell you if it's possible or not:
1. with v_ model you mean viewmodel?, then yes
8. No, you can only block every step or none. (Although maybe it's possible by blocking player_footstep event)
9. Yes that's possibled
11. yes
12. yes
13. yes
14. yes
15. yes
16. not sure but should be possible
17. yes (SDKHooks)
18. dont think so
19. dont think so
20. you would have to find out where water is, then compare the players coordinates (otherwise a flag is set, but you cant find out which body part is under water)
21. yes ? havent encountered any bug yet
22. no you cant force binds on players and are limited to what you can execute in their console
-Absolute- is offline
.Dare Devil.
Veteran Member
Join Date: Sep 2010
Old 02-03-2012 , 12:55   Re: Some questions about source pawn.
Reply With Quote #3

Quote:
Originally Posted by -Absolute- View Post
I'm not that good in SourcePawn, so I can only tell you if it's possible or not:
1. with v_ model you mean viewmodel?, then yes
8. No, you can only block every step or none. (Although maybe it's possible by blocking player_footstep event)
9. Yes that's possibled
11. yes
12. yes
13. yes
14. yes
15. yes
16. not sure but should be possible
17. yes (SDKHooks)
18. dont think so
19. dont think so
20. you would have to find out where water is, then compare the players coordinates (otherwise a flag is set, but you cant find out which body part is under water)
21. yes ? havent encountered any bug yet
22. no you cant force binds on players and are limited to what you can execute in their console
Thank you for your answers.

are you 100% sure about 11. - 15 questions?
.Dare Devil. is offline
Dr. Greg House
Professional Troll,
Part-Time Asshole
Join Date: Jun 2010
Old 02-03-2012 , 13:45   Re: Some questions about source pawn.
Reply With Quote #4

Yes, he can be.

Last edited by Dr. Greg House; 02-03-2012 at 13:46.
Dr. Greg House is offline
.Dare Devil.
Veteran Member
Join Date: Sep 2010
Old 02-03-2012 , 14:00   Re: Some questions about source pawn.
Reply With Quote #5

Quote:
Originally Posted by Dr. Greg House View Post
Yes, he can be.
OK

I think i need to found these things by my own.
But thanks anyway for helping.
.Dare Devil. is offline
tjdgns9246
Member
Join Date: Dec 2009
Old 02-03-2012 , 20:38   Re: Some questions about source pawn.
Reply With Quote #6

20.
PHP Code:
stock GetWaterLevel(client)
{
   return 
GetEntProp(clientProp_Send"m_nWaterLevel");
}

// 0 - not in water
// 1 - feet
// 2 - body (you can jump from now on)
// 3 - head 
someday i will add post more.

good luck
__________________
Sorry for my strange grammar.
I'm Korean who you might already know.
So, I need your understanding.
Thanks.
tjdgns9246 is offline
.Dare Devil.
Veteran Member
Join Date: Sep 2010
Old 02-04-2012 , 13:30   Re: Some questions about source pawn.
Reply With Quote #7

Quote:
Originally Posted by tjdgns9246 View Post
20.
PHP Code:
stock GetWaterLevel(client)
{
   return 
GetEntProp(clientProp_Send"m_nWaterLevel");
}

// 0 - not in water
// 1 - feet
// 2 - body (you can jump from now on)
// 3 - head 
someday i will add post more.

good luck
thanks.
.Dare Devil. is offline
.Dare Devil.
Veteran Member
Join Date: Sep 2010
Old 02-11-2012 , 07:30   Re: Some questions about source pawn.
Reply With Quote #8

One question about weapons.

Weapons all sounds are in example v_m4a1.qc right?
I decompile source v_m4a1 model but i did not get .qc file. program stoped working.
( its always do that, i dont know what is the problem )

So if this is true, i need code how to change weapon model.
I did some search and found a module what can change weapon models but
there was a bug that "silenced m4a1, usp show original model".

i dont know is it true and i dont know is it working.
i can not test right now ( need to download css again, i broke the files when i set valve hammer sdk working fine. )

can someone tell me about this module more. ( who have used that. )
_____________________________________________ _________________________________
Found a ohter thing http://addons.eventscripts.com/addon...epmodelchanger
i think we can not use event script in source pawn or can we?

thanks!
PS: sorry about my bad english.









Edit2:
When i can not decompile file or can not access the file source code then i always read file with hex editor.
Its seems like sounds dont are in model file ( i mean only the sound name what need to play example if fire. )
in cs16 was a all sound in qc file ( except that shoot sound )

I have search in this forum about replace the weapon sounds, but it seems they are so client side that we can not change sounds.
this is sad, now i am tryng to learn a source engine client side things and mayby i can replace weapons sounds with module (i mean Extension [dont really know what this word means but its like module "dll c++"] )













Edit 3:
Found a file where are weapon sounds
Quote:
cstrike/scripts/game_sounds_weapons.txt
they are event scripts right?

here come question again.
how to system know that he must open this file not any ohter?
is it true what i thinking that when i place in this folder my script then css auto load it?

mayby there are some bug how we can disable old weapon sounds,
like make by sourcepawn some engine bug for client side that will skip a sound play.
Or some ohter ideas?

Thanks again!

Last edited by .Dare Devil.; 02-11-2012 at 09:25. Reason: edit3
.Dare Devil. is offline
.Dare Devil.
Veteran Member
Join Date: Sep 2010
Old 03-12-2012 , 15:34   Re: Some questions about source pawn.
Reply With Quote #9

Bump!
.Dare Devil. is offline
RedSword
SourceMod Plugin Approver
Join Date: Mar 2006
Location: Quebec, Canada
Old 03-12-2012 , 18:48   Re: Some questions about source pawn.
Reply With Quote #10

"10. is it possible to control sprite anim move, like set frame 6 or 10 and it will stay in 6 or 10 frame // Done"

Any link on how to do so please ?

Letting hyperlink for other people could help too, and you wouldn't need to do that last thing you made :p.
__________________
My plugins :
Red Maze
Afk Bomb
RAWR (per player/rounds Awp Restrict.)
Kill Assist
Be Medic

You can also Donate if you appreciate my work
RedSword 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 20:50.


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