Raised This Month: $13 Target: $400
 3% 

Showing results 1 to 25 of 500
Search took 0.03 seconds.
Search: Posts Made By: Bugsy
Forum: Scripting Help Yesterday, 22:55
Replies: 4
Views: 66
Posted By Bugsy
Re: Questions about optimization and cs_set_user_team()

frio, your code that I edited wouldn't do this either, but I just made an edit to do so.
Forum: Scripting Help Yesterday, 21:47
Replies: 4
Views: 66
Posted By Bugsy
Re: Questions about optimization and cs_set_user_team()

1. Correct, you are only accessing players[] once per pass so it is fine.

2. Yeah, see the below code.

For your last question, it's called Hungarian notation...
Forum: Suggestions / Requests Yesterday, 20:26
Replies: 5
Views: 115
Posted By Bugsy
Re: Doesn't SQL_ReadResult support UTF8?

Are you able to see if any data is stored outside of the first byte with the UTF8 characters in your string?

Example:

new szTest[] = "A";

server_print( "[%d][%d][%d][%d]" , szTest{0} ,...
Forum: Scripting Help Yesterday, 20:01
Replies: 31
Views: 462
Posted By Bugsy
Re: how to execute a function if player is in air?

Not perfect but it may work for you. When transitioning from flat land to a slope you are technically in the for a split second and it will trigger the function. Also, if someone spams the jump...
Forum: Scripting Help 06-01-2020, 18:34
Replies: 9
Views: 126
Posted By Bugsy
Re: call a function when certain cvar changes its value?

Upgrade to 1.9 and it's super easy: http://amxmodx.org/api/cvars/hook_cvar_change

Otherwise I'd stick with hooking a game event, not prethink.
Forum: Scripting Help 06-01-2020, 17:16
Replies: 9
Views: 126
Posted By Bugsy
Re: call a function when certain cvar changes its value?

How critical is it that the change in cvar is detected immediately? You can always hook a game event and then react there (round start or end, or on each kill).
Forum: Scripting Help 05-29-2020, 23:40
Replies: 5
Views: 198
Posted By Bugsy
Re: How to advance in Pawning.

Key thing in my opinion is learning the Pawn syntax so you know how to create code, AMX-X/game aside. For example, creating if statements, loops, defining variables/arrays/constants, case statements,...
Forum: Code Snippets/Tutorials 05-29-2020, 19:19
Replies: 13
Views: 4,093
Posted By Bugsy
Re: [INC] nVault Array

nVault Array is really just a hacky way of storing 4-byte integers in a string. For every value you save in an nVault array, it consumes 5 characters of string in the vault. So to keep this from...
Forum: Scripting Help 05-29-2020, 18:10
Replies: 5
Views: 414
Posted By Bugsy
Re: Gamedata Hook AMX 1.9

Don't speak in code. Tell us what you are trying to do, not how you think it has to be done.
Forum: Code Snippets/Tutorials 05-29-2020, 18:09
Replies: 13
Views: 4,093
Posted By Bugsy
Re: [INC] nVault Array

Are you seeing this error in your logs?

Array size too large, you must increase NVAULT_ARRAY_MAXARRAYSIZE in nvault_array.inc

I would creare an enum like this for your data

enum PlayerData...
Forum: Suggestions / Requests 05-28-2020, 17:07
Replies: 10
Views: 274
Posted By Bugsy
Re: [HELP] Hide SteamID

This violates Valve's Policy of Truth. There's no reason to hide Steam ID's.
Forum: Suggestions / Requests 05-28-2020, 12:50
Replies: 2
Solved For CT
Views: 106
Posted By Bugsy
Re: For CT

//Add to top
#include <cstrike>

//In DeathMsg, replace existing with
if(!is_user_connected(vid) || vid == kid || !is_user_connected(kid) || ( cs_get_user_team( vid ) != CS_TEAM_CT ) ) return ;
Forum: Suggestions / Requests 05-27-2020, 22:41
Replies: 8
Views: 231
Posted By Bugsy
Re: Revive a player in a certain radius

Only one at a time, starting with the closest. The chances of them being at an exact distance away is slim.
Forum: Suggestions / Requests 05-27-2020, 20:10
Replies: 8
Views: 231
Posted By Bugsy
Re: Revive a player in a certain radius

I made edits, look above
Forum: Suggestions / Requests 05-27-2020, 19:19
Replies: 8
Views: 231
Posted By Bugsy
Re: Revive a player in a certain radius

Not thoroughly tested

Added cvars
Code cleanup
Made a little smarter

It finds closest if multiple players are close enough for revive.
Stops revive if you move too far away while reviving...
Forum: Code Snippets/Tutorials 05-27-2020, 16:31
Replies: 13
Views: 4,093
Posted By Bugsy
Re: [INC] nVault Array

I guess, but it looks sloppy being inconsistent.


I think you did the complete opposite. It's much more uniform to have an enumerator define all of your constants instead of having multiple...
Forum: Code Snippets/Tutorials 05-26-2020, 16:47
Replies: 13
Views: 4,093
Posted By Bugsy
Re: [INC] nVault Array

Shouldn't these codes:

playerCases[i][id] = userDATA[id][pdCases][i];
sttNumber = stattrak[i][id];
killsNumber = kill[i][id];
skinSelected = UsingWeapon[i][id];

be...
Forum: Suggestions / Requests 05-25-2020, 22:47
Replies: 59
Views: 744
Posted By Bugsy
Re: Remaining CT = slay

Not sure, I don't think it's possible since the code shows HUD OR kills. Are you running anything else that would slay a player?

if ( --g_iSeconds >= 1 )
{
set_hudmessage( 0 ,...
Forum: Off-Topic 05-25-2020, 22:00
Replies: 7
Views: 455
Posted By Bugsy
Re: Add some new BBCodes and improve old ones

Dark Reader is nearly perfect, only issue I've noticed so far is I cannot see some of the moderator/plugin-approver buttons unless I disable the dark theme.
Forum: Scripting Help 05-25-2020, 21:38
Replies: 9
Views: 431
Posted By Bugsy
Re: Problem with AFK Detection

Do some debugging. This involves adding logs/server_prints() in places in your code to help determine why conditions/values are not what you expect.

public DeathMsg()
{
new iKiller =...
Forum: Suggestions / Requests 05-25-2020, 18:55
Replies: 59
Views: 744
Posted By Bugsy
Re: Remaining CT = slay

https://forums.alliedmods.net/showpost.php?p=2702251&postcount=49
Forum: Suggestions / Requests 05-25-2020, 13:40
Replies: 59
Views: 744
Posted By Bugsy
Re: Remaining CT = slay

Here's what I think you are suggesting:


#include <amxmodx>

new const Version[] = "0.5";

new g_pSlayNoBots , g_pSlayWithBots , g_pSlayDelay , g_pPluginStartDelay;
new g_Bots , g_iSeconds ,...
Forum: Suggestions / Requests 05-25-2020, 13:20
Replies: 59
Views: 744
Posted By Bugsy
Re: Remaining CT = slay

Suppose slay should only occur if 90 or more seconds have passed in the round.
Suppose all other conditions for HUD/slay are met at 5 seconds into the round.

I now need to trigger the HUD/slay...
Forum: Suggestions / Requests 05-25-2020, 12:55
Replies: 59
Views: 744
Posted By Bugsy
Re: Remaining CT = slay

1. I was doing that, but he then decided he wants the slay to only occur after X seconds have passed in a round. If I only check on death and the round seconds have not yet reached the desired...
Forum: Scripting Help 05-25-2020, 12:49
Replies: 9
Views: 431
Posted By Bugsy
Re: Problem with AFK Detection

Do this at spawn:
g_IsAFK[id] = false

And remove this at spawn, since you are already checking alive on the next line of code:
if(!is_user_alive(id))
return HAM_IGNORED

Did a minor...
Showing results 1 to 25 of 500

 
Forum Jump

All times are GMT -4. The time now is 08:57.


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