Raised This Month: $7 Target: $400
 1% 

Showing results 1 to 25 of 500
Search took 0.01 seconds.
Search: Posts Made By: hleV
Forum: Code Snippets/Tutorials 06-15-2020, 11:50
Replies: 37
Views: 30,494
Posted By hleV
Re: Some pev_body information

Try this:
/**
* Calculates model body index from given parameters.
*
* @param parts Model part indexes from each group
* @param sizes Each group's sizes
* @param count Total amount of...
Forum: Scripting Help 03-04-2020, 05:58
Replies: 6
Views: 2,164
Posted By hleV
Re: DHUD empty spaces

Manually define spacing for every character. Maybe something like this (could be improved to use a smaller array, but fine for an example):

new Float:CharSpace[1024];

SetupCharSpace()
{
...
Forum: Scripting Help 03-03-2020, 05:31
Replies: 6
Views: 2,164
Posted By hleV
Re: DHUD empty spaces

In theory you could make a table containing information about each character's width (e.g. character 'i' = 0.5, 'W' = 1.5), and then add spaces according to the sum of all character spaces in a...
Forum: Module Coding 02-03-2020, 01:29
Replies: 161
Views: 79,757
Posted By hleV
Re: Module: Fake Server Queries

It should restore the setting to its default value:
Forum: Scripting 10-21-2019, 02:45
Replies: 3
Views: 1,755
Posted By hleV
Re: PrintHintTextToAll to make a HUD

I believe you should be using Format instead of FormatEx if you're reusing output buffer as input parameter.
Forum: Scripting Help 10-08-2019, 11:09
Replies: 7
Views: 1,623
Posted By hleV
Re: Avoid duplicating the code

Function1()
{
if( get_pcvar_num( cvar1 ) )
{
if( blablabla )
{
Function2();
}
}
else
Forum: Module Coding 08-09-2019, 08:14
Replies: 15
Views: 11,655
Posted By hleV
Forum: Scripting 05-23-2019, 08:01
Replies: 3
Views: 1,611
Posted By hleV
Re: CSS - Is it possible to make a player float above ground?

Perhaps you could create an invisible entity with the height of X underneath the player, and make it solid for that particular player only? Not sure about implementation, just need to play around and...
Forum: Scripting Help 05-23-2019, 07:42
Replies: 26
Views: 5,270
Posted By hleV
Re: client_disconnected() <-> plugin_end()

Then don't save on every kill/death. Just save on disconnect AND mapchange. This will only be a problem if server crashes, in which case latest data of connected players won't be saved.
Forum: Scripting Help 05-22-2019, 08:13
Replies: 26
Views: 5,270
Posted By hleV
Re: client_disconnected() <-> plugin_end()

Can something happen between server_changelevel() and plugin_end() that you would want to save to the database? If so you can simply mark that map is changing, but do the big query on plugin_end().
...
Forum: Scripting Help 05-21-2019, 09:59
Replies: 26
Views: 5,270
Posted By hleV
Re: client_disconnected() <-> plugin_end()

One big query on mapchange should be more optimal than 30 queries (because client_disconnected() in your case will be called ~30 times before map changes).
Forum: Scripting Help 05-21-2019, 05:05
Replies: 26
Views: 5,270
Posted By hleV
Re: client_disconnected() <-> plugin_end()

Yes, you'd be looping through all players and building the query string accordingly.

Something like this...
Forum: Scripting Help 05-21-2019, 02:58
Replies: 26
Views: 5,270
Posted By hleV
Re: client_disconnected() <-> plugin_end()

The only things you can do at this point are:

Get a faster MySQL server/closer to your game server for faster queries
Re-design plugin logic to not require saving upon disconnect
Improve the...
Forum: Scripting Help 05-19-2019, 09:04
Replies: 8
Views: 2,157
Posted By hleV
Re: Attach entity to vehicle (car)

If editing the brush model is an option, you could move it so it'd better align with the car.
Forum: Scripting Help 05-17-2019, 08:43
Replies: 8
Views: 2,157
Posted By hleV
Re: Attach entity to vehicle (car)

entity_set_edict(brush, EV_ENT_aiment, vehicle);
entity_set_int(brush, EV_INT_movetype, MOVETYPE_FOLLOW); // May be unnecessary, test
Forum: HL1 Servers (HLDS) 11-20-2018, 12:38
Replies: 5
Views: 3,303
Posted By hleV
Re: Half-Life Docker

It's been maybe a month or so since my last attempt, but for me it'd fail to download all the required files unless I logged in to SteamCMD with an actual Steam account rather than as anonymous.
Forum: Scripting 03-20-2018, 12:51
Replies: 18
Views: 4,878
Posted By hleV
Re: "Client X is not connected" directly after IsClientConnected

His conditions are correct. If not connected = skip. If fakeclient = skip. Otherwise Emit sound.
Forum: Scripting Help 01-05-2018, 17:52
Replies: 6
Views: 910
Posted By hleV
Re: Dynamic Arrays.

g_iWeapons[ Weapon_Origin[0]]
:arrow:
g_iWeapons[ Weapon_Origin][0]
Forum: Scripting 12-13-2017, 10:16
Replies: 4
Views: 1,538
Posted By hleV
Re: !roulette random possibility

int num = GetRandomInt(1, 100);

if (num <= 48)
{
// Black
}
else if (num <= 48 + 48) // Or just <= 96, but I think it's easier to understand like that?
{
// Red
}
Forum: Scripting 09-28-2017, 10:09
Replies: 9
Views: 2,508
Posted By hleV
Re: L4D2, How to Get Reserve Ammo Without m_hOwnerEntity?

Supposedly the reserve ammo is held by the player, not the weapon.
Forum: Scripting 06-03-2017, 13:58
Replies: 2
Views: 1,352
Posted By hleV
Re: Multiple definition in case

Number ranges for switch were removed from SM. Use if else.
Forum: Scripting 11-24-2016, 02:55
Replies: 7
Views: 1,602
Posted By hleV
Re: Should I CloseHandle(plugin) ???

Yes.
https://sm.alliedmods.net/new-api/sourcemod/GetPluginIterator
Forum: Scripting 11-14-2016, 12:48
Replies: 6
Views: 1,382
Posted By hleV
Re: [CS:GO] not able to handle / stop CS_OnTerminateRound?

Did you register the event with EventHookMode_Pre?
Forum: Scripting 10-30-2016, 06:13
Replies: 23
Views: 4,132
Posted By hleV
Re: Code styles - prefered, readability & performance

For me personally
condition
{
statement
}

if (x)
{
x = y;
}
Forum: Scripting 09-09-2016, 09:41
Replies: 6
Views: 1,966
Posted By hleV
Re: CS:GO Glock Right-Click Hook?

You could try hooking the sound. I think it's more efficient than checking in OnPlayerRunCmd().
Showing results 1 to 25 of 500

 
Forum Jump

All times are GMT -4. The time now is 00:45.


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