Raised This Month: $41 Target: $400
 10% 

Showing results 1 to 25 of 500
Search took 0.03 seconds.
Search: Posts Made By: Black Rose
Forum: Scripting Help Yesterday, 04:38
Replies: 3
Views: 70
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, 18:02
Replies: 2
Views: 75
Posted By Black Rose
Re: Question about top15

You can't.
The end.
Forum: Scripting Help 04-10-2021, 17:59
Replies: 3
Views: 70
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, 03:06
Replies: 6
Views: 149
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, 12:20
Replies: 6
Solved write_bye
Views: 214
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, 11:26
Replies: 2
Views: 174
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, 04:48
Replies: 9
Views: 600
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, 11:24
Replies: 9
Views: 600
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, 15:07
Replies: 2
Views: 158
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, 14:43
Replies: 9
Views: 600
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, 14:14
Replies: 12
Views: 350
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, 02:09
Replies: 3
Views: 147
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, 11:23
Replies: 16
Solved if problem
Views: 567
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, 13:04
Replies: 6
Solved sql in amx ?
Views: 491
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, 15:28
Replies: 5
Views: 357
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...
Forum: Scripting Help 01-23-2021, 10:05
Replies: 8
Views: 422
Posted By Black Rose
Re: hook player id

So yeah. So you have a couple of options.

If we take this code here:

if ( cs_get_user_team(id) == CS_TEAM_T ){
switch(checkT[id]){
case 1:{
cs_set_user_model(id, "isis")...
Forum: Off-Topic 01-23-2021, 08:35
Replies: 5
Views: 1,563
Posted By Black Rose
Re: forum bbcode suggestions

No problem. I love doing stuff with JavaScript.

I had a tug of war with the automatic forum security over onclick event in the code which I eventually won.
Now also contains copy button.
Forum: Scripting Help 01-23-2021, 05:40
Replies: 8
Views: 422
Posted By Black Rose
Re: hook player id

In a not so far distant future.
One (wo)man on a quest for answers.
Little did (s)he know how it all would end...



Suddenly, a helpful character emerges from the darkness...

Helpful...
Forum: Off-Topic 01-22-2021, 20:01
Replies: 5
Views: 1,563
Posted By Black Rose
Re: forum bbcode suggestions

https://chrome.google.com/webstore/detail/custom-javascript-for-web/poakhlngfciodnhlhhgnaaelnpjljija (or something similar)

Nothing fancy.
It doesn't add line numbers to edits or new posts, only...
Forum: Scripting Help 01-22-2021, 16:28
Replies: 18
Views: 965
Posted By Black Rose
Re: socket_* returns Bad Request

The missing slash was the reason for 400. HTTP servers are picky bastards.
https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Client_request

The example code gives me "301 Moved...
Forum: Scripting Help 01-21-2021, 11:00
Replies: 18
Views: 965
Posted By Black Rose
Re: socket_* returns Bad Request

bans/%s
->
/bans/%s
Forum: Scripting Help 01-11-2021, 12:18
Replies: 10
Views: 824
Posted By Black Rose
Re: Round Restart Error Forcing Players to Select Team

I think there's an obvious mistake somewhere. Because cvars are so simple that they can't go wrong.

I'm just guessing here but I'm assuming you're trying to edit the cvars inside the source code...
Forum: Scripting Help 01-08-2021, 16:59
Replies: 10
Views: 824
Posted By Black Rose
Forum: Scripting Help 01-06-2021, 08:21
Replies: 1
Views: 146
Posted By Black Rose
Re: Help?

In the future, please explain what you expect your code to do. Otherwise it might be hard for others to understand what is wrong, especially when it's not in english.


public money(id)
{
...
Forum: Scripting Help 01-06-2021, 08:14
Replies: 2
Views: 178
Posted By Black Rose
Re: Run time error 3: stack error

static gTopSort[ 9999 ][ 2 ];


Since everything is regulated by iStatsTotal you shouldn't have to clean it each cycle (static is more or less a global variable and retains it's value when...
Showing results 1 to 25 of 500

 
Forum Jump

All times are GMT -4. The time now is 16:20.


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