Raised This Month: $45 Target: $400
 11% 

Showing results 1 to 25 of 500
Search took 0.13 seconds.
Search: Posts Made By: Black Rose
Forum: Scripting Help 12-19-2021, 12:04
Replies: 19
Views: 1,223
Posted By Black Rose
Re: ExecuteForward

My previous experience:
https://forums.alliedmods.net/showthread.php?t=241630
Forum: Off-Topic 12-18-2021, 18:17
Replies: 8
Views: 2,256
Posted By Black Rose
Re: What's your favorite game?

DotA 2 for multiplayer.
Divinity: Original Sin 2 for singleplayer.

You started the topic but didn't disclose your favourite game(s)? What is/are it/they?
Forum: Scripting Help 12-18-2021, 17:49
Replies: 19
Views: 1,223
Posted By Black Rose
Re: ExecuteForward

So the first register will push the variable +1, but it will return the index of the last created entry.

What it does (in short):
native_register_zm_class() is called
Array is pushed to index 0....
Forum: Off-Topic 06-18-2021, 16:28
Replies: 1
Views: 1,939
Posted By Black Rose
Re: Regex Help - RestrictNames 1.2a

Random-Clan\s+\|+\s+Player\([0-9]\)
Not sure if ^ and $ work within the game. You should try without those.
Forum: Scripting Help 05-13-2021, 04:58
Replies: 10
Views: 493
Posted By Black Rose
Re: getting data from get request not work

Even though that specific example doesn't work it's still relevant.



1. Download the zip for your server platform.
2. Unzip and place the binary in "cstrike\addons\amxmodx\modules".
3. Open...
Forum: Scripting Help 05-02-2021, 08:47
Replies: 2
Views: 418
Posted By Black Rose
Re: Hooking ScreenFade

If you're trying to hook screenfade sent by other plugins they need to send it using emessage_*()/ewrite_*() natives.


/* These are the same as above, except that the messages sent
* are also...
Forum: Scripting Help 04-25-2021, 16:39
Replies: 7
Views: 619
Posted By Black Rose
Re: How to pass tagged variable to other plugins

Tags doesn't actually do anything except makes the compiler capable of telling you that you might have used a variable in the wrong context. After compilation they're basically gone.
However, if you...
Forum: Scripting Help 04-20-2021, 14:33
Replies: 10
Views: 783
Posted By Black Rose
Re: How can I make NPCs avoid obstacles ?

There are design choices you can make along the way that will make the code more or less efficient.

The most important one is when is the pathing "out of date" and need to be updated?

Another...
Forum: Scripting Help 04-17-2021, 14:50
Replies: 10
Views: 783
Posted By Black Rose
Re: How can I make NPCs avoid obstacles ?

https://forums.alliedmods.net/showthread.php?t=242208

It needs work though. Generally the problem is the ground. I have been thinking to come back to this issue but never got around to it.

I...
Forum: Scripting Help 04-17-2021, 14:28
Replies: 2
Views: 289
Posted By Black Rose
Re: Help convert from engine to fakemete

Difference: 274 NANOSECONDS (that's 0.000 000 274s) per iteration.
Winner: Engine

Can we just kill this stupid idea now?


#include <amxmodx>
#include <engine>
#include <fakemeta>
#include...
Forum: Scripting Help 04-11-2021, 05:38
Replies: 3
Views: 360
Posted By Black Rose
Re: Max Player Armor

Not sure how you implemented it, this is what I intended:

public zp_extra_item_selected(player, itemid)
{
if ( itemid == g_itemid_armor && pev(player, pev_armorvalue) >= g_armor_limit )
{...
Forum: Scripting Help 04-10-2021, 19:02
Replies: 2
Views: 317
Posted By Black Rose
Re: Question about top15

You can't.
The end.
Forum: Scripting Help 04-10-2021, 18:59
Replies: 3
Views: 360
Posted By Black Rose
Re: Max Player Armor

You can use zp_extra_item_selected() to hook the purchase. Make your checks, for example:
if ( get_user_armor(id) + g_armor_amount > g_armor_limit ) // If you want to block buying at 101-200 armor....
Forum: Scripting Help 04-10-2021, 04:06
Replies: 6
Views: 384
Posted By Black Rose
Re: Increase cvar by a code

So debug it...

// Zombie killed human, add up the extra frags for kill
server_print("g_zombie[%d]: %d, pcvar(cvar_fragsinfect): %d", attacker, g_zombie[attacker],...
Forum: Scripting Help 04-06-2021, 13:20
Replies: 6
Solved write_bye
Views: 430
Posted By Black Rose
Re: write_bye

If the timing is wrong the game will overwrite your data unless you block the original message (assuming it's possible, I'm shit at the engine).

If you hook the event with a little console print...
Forum: Scripting Help 04-04-2021, 12:26
Replies: 2
Views: 340
Posted By Black Rose
Re: New message started when msg '23' has not been sent yet

message_begin(MSG_BROADCAST, SVC_TEMPENTITY); // Line 99
write_byte(TE_BLOODSPRITE);
engfunc(EngFunc_WriteCoord, Origin2[0])
engfunc(EngFunc_WriteCoord, Origin2[1])
...
Forum: Scripting Help 02-26-2021, 05:48
Replies: 9
Views: 826
Posted By Black Rose
Re: help me with this respawn plugin

Sorry. I missed this:

public fwd_HamKilled(id, Victim, Attacker, Shouldgib)

-->

public fwd_HamKilled(Victim, Attacker, Shouldgib) {
Forum: Scripting Help 02-22-2021, 12:24
Replies: 9
Views: 826
Posted By Black Rose
Re: help me with this respawn plugin

read_data() is not a function which is to be used with Ham_* forwards, only for messages hooked using register_event() (perhaps others, not entierly sure).

public fwd_HamKilled(id, Victim,...
Forum: Scripting Help 02-13-2021, 16:07
Replies: 2
Views: 259
Posted By Black Rose
Re: Server crashes Run time error 4: index out of bounds

Most likely missing a connected check or valid player range check on attacker. Probably the map that has the issues also has a way to suicide while the other might not.

Another possibility if your...
Forum: Scripting Help 02-13-2021, 15:43
Replies: 9
Views: 826
Posted By Black Rose
Re: help me with this respawn plugin

This is what I use on my server.
Doesn't detect spectator change, you'll have to add that separately.

#include <amxmodx>
#include <hamsandwich>

public plugin_init()
{...
Forum: Scripting Help 02-12-2021, 15:14
Replies: 12
Views: 610
Posted By Black Rose
Re: Need help with optimization

It all depends on how often it is called.

In your case I'd say your code is fine. but !x_arg[0] or strlen(x_arg) is a good compliment.


*cough* +1
Forum: Scripting Help 02-12-2021, 03:09
Replies: 3
Views: 252
Posted By Black Rose
Re: Compiling error

Just to be clear.

condition1 ? (yes1)condition2 ? yes2 : no2 : no1 //good
condition1 ? yes1 : (no1)condition2 ? yes2 : no2 //good
Forum: Scripting Help 02-01-2021, 12:23
Replies: 16
Solved if problem
Views: 829
Posted By Black Rose
Re: if problem

Any of these are correct:

if ( Restarted < 2 )
{
Restarted++; // Increased AFTER comparison
}


if ( ++Restarted <= 2 ) // Increased BEFORE comparison
{
Forum: Scripting Help 01-25-2021, 14:04
Replies: 6
Solved sql in amx ?
Views: 645
Posted By Black Rose
Re: sql in amx ?

You're gonna kick yourself.


@@ if(SQL_Connection != Empty_Handle) client_print(0,print_chat,"%s",error)
else sql_select(id)

->

@@ if(SQL_Connection == Empty_Handle)...
Forum: Scripting Help 01-24-2021, 16:28
Replies: 10
Views: 1,058
Posted By Black Rose
Re: How to learn amxx scripting?

Similar or not doesn't really matter. You will always have easier to learn if you know another programming language because you understand a lot of the basics already and can see patterns by looking...
Showing results 1 to 25 of 500

 
Forum Jump

All times are GMT -4. The time now is 12:38.


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