Re: [INFO] Fakemeta & Ham detailed function descriptions and examples
Good job!
Keep em coming. Added all of them to the main post and added a little extra info on Ham_TakeDamage. So please recheck if interested. |
Re: [INFO] Fakemeta & Ham detailed function descriptions and examples
Fakemeta function:
PHP Code:
This function is used to check if an entity is in your PVS. It can be used on all entities except worldspawn! Here I will show you how to use is, since this function has a paramater that must be obtained in a special way! What is PVS? PVS means potentially visible set, this means that the entities that we have in this list can be seen. PVS does not hold just the entities that we see! By knowing this we can get to the conclusion that PVS has the role of limiting data transfer for better internet connection/lower amount of data transfer! So in small words I want to say something like this: Code:
Entity that is in PVS => Can be seen => Data Transfer about that entity Well let's say that every room of the map is a cube. We find ourselves in a room and that also means that we are in the cube of that room. We can see the entities in the next rooms because the cubes of that room touch with the cube of the room we are in. How do I use this function? Well this function has a parameter that must be obtained in a special way. That is the "pset" parameter. Here is how you obtain that parameter. Note: The parameter is player only, that means that if you get pset for example for a player that has the id "1". When you use this function on an entity it will check whether that entity is in PVS of the Player id "1". Example Usage: PHP Code:
|
Re: [INFO] Fakemeta & Ham detailed function descriptions and examples
Fakemeta function:
PHP Code:
The function allows to get the bone positions of an entity. This is best used on getting specific player origin points. These are the bones that a player has. Code:
Bone 1 Name: "Bip01" [IMG]http://img507.**************/img507/7762/playerskeleton.jpg[/IMG] Usage: PHP Code:
These stocks are made for CS/CZ you need to port them to other mods. This gets the hitgroup of the bone. PHP Code:
PHP Code:
|
Re: [INFO] Fakemeta & Ham detailed function descriptions and examples
Fakemeta function :
Code:
Description : Return the next "player" entity in someone PVS using a global loop. Usage : Code:
Notes : It seems you can call this function once between some forward (maybe UpdateClientData, Think, AddToFullPack or some other). |
Re: [INFO] Fakemeta & Ham detailed function descriptions and examples
I suggest doing an example of that function.
Since it is harder to use than EngFunc_FindEntityByString or FindEntityInSphere |
Re: [INFO] Fakemeta & Ham detailed function descriptions and examples
Fakemeta function :
Code:
Description : Prints an alert message. Usage: Code:
|
Re: [INFO] Fakemeta & Ham detailed function descriptions and examples
Quote:
It seems you can call this function once between some forward (maybe UpdateClientData, Think, AddToFullPack). I'm thinking this based on my tests and what Arkshine said in other post. If you call this function 1000 times inside a loop, it always returns the same entity. In fakemeta there's a FM_FindClientInPVS but if you try to forward that call, it's not even called (tried to run, jump, shoot, kill, plant bomb and wait the explosion, drop guns, throw nades, etc). |
Re: [INFO] Fakemeta & Ham detailed function descriptions and examples
Quote:
CheckVisibility and FindEntsInPVS are better to use. |
Re: [INFO] Fakemeta & Ham detailed function descriptions and examples
Quote:
I think it doesn't have problems. I think it's as is :) |
Re: [INFO] Fakemeta & Ham detailed function descriptions and examples
Yeah I remember it's just a pain how works this function. If you refer at a post -somewhere- there is a delay between each update, and it matches with the frequency of the "entity-without-classname" ( This entity is created right after max_clients ; if there is entities created in plugin_precache(), this entity will be created after that ). This entity is updated between .25 to 0.3s. It could be used there but it's more easy and efficient to use FindEntsInPVS.
|
All times are GMT -4. The time now is 19:33. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.