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(client, args)
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?
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(client, Prop_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(client, Prop_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