Raised This Month: $32 Target: $400
 8% 

Showing results 1 to 25 of 325
Search took 0.01 seconds.
Search: Posts Made By: Scone
Forum: Plugins 06-24-2013, 06:58
Replies: 120
Views: 50,410
Posted By Scone
Re: Signal PM System - MySQL/SQLite based in-game Private Messaging

The issue is probably the databases.cfg file - make sure you've set it up properly. If you want you can post it here and I'll check it (remember to remove your database password first though).
Forum: Plugins 12-24-2011, 08:08
Replies: 120
Views: 50,410
Posted By Scone
Re: Signal PM System - MySQL/SQLite based in-game Private Messaging

What I'm saying is that, if for some reason you need to access that command through rcon in game, I'd be happy to post a new version of the plugin for you. But otherwise, since you can run the...
Forum: Scripting 12-23-2011, 12:47
Replies: 2
Views: 898
Posted By Scone
Re: Counting mins and secs

There's no need to use timers like that, you could simply do this:

new rtv_timeallowed;

public OnConfigsExecuted()
{
rtv_timeallowed = GetTime() + GetConVarInt(g_Cvar_InitialDelay);...
Forum: Plugins 12-23-2011, 07:39
Replies: 120
Views: 50,410
Posted By Scone
Re: Signal PM System - MySQL/SQLite based in-game Private Messaging

I'll update the plugin if you want, but you don't actually need RCON to run that command - you can do it directly with root admin.
Forum: Plugins 12-22-2011, 16:57
Replies: 120
Views: 50,410
Posted By Scone
Re: Signal PM System - MySQL/SQLite based in-game Private Messaging

Updated to version 1.4.2, attached to original post:

- Fixed problems with client 0 (console) running pmaddserverfriend
- All MySQL tables now use primary keys instead of unique keys by default...
Forum: Plugins 12-22-2011, 11:51
Replies: 120
Views: 50,410
Posted By Scone
Re: Signal PM System - MySQL/SQLite based in-game Private Messaging

It sounds like that's a problem with some other piece of software, not the plugin itself. You can probably fix it by changing the 'UNIQUE' index to a primary key for that table.
Forum: Scripting 11-23-2011, 06:34
Replies: 6
Views: 1,473
Posted By Scone
Re: [HELP]If Statements with Strings?

decl String:astring[5];
GetCmdArg(3, astring, sizeof(astring));

No need for the equals there.
Forum: Scripting 11-04-2011, 18:06
Replies: 9
Views: 2,035
Posted By Scone
Re: Getting a string at a certain index

The [2] in the declaration implies that there are two elements, [0] and [1]. Declaring it with [1] element would mean that there was only one, [0].

If you're only working with one character...
Forum: Scripting 11-03-2011, 09:38
Replies: 9
Views: 2,035
Posted By Scone
Re: Getting a string at a certain index

Sorry, I don't fully understand the question.
Forum: Scripting 11-03-2011, 05:14
Replies: 9
Views: 2,035
Posted By Scone
Re: Getting a string at a certain index

Here's a function from my calculator plugin. It puts the character into a new integer, then works with that integer value. Hope that helps.


ReadToken(const String:source[], &pos, &Float:num,...
Forum: Scripting 10-19-2011, 17:09
Replies: 23
Views: 4,327
Posted By Scone
Re: [ASK] Does these lines have risk to exploit?

That piece of code doesn't make sense - forum_name isn't declared anywhere. If this isn't related to the original problem it might be better to start a new thread.
Forum: Scripting 10-18-2011, 12:50
Replies: 23
Views: 4,327
Posted By Scone
Re: [ASK] Does these lines have risk to exploit?

SQL_FetchRow actually gets the data from the database. See the API (http://docs.sourcemod.net/api/) for more info.
Forum: Scripting 10-18-2011, 04:10
Replies: 23
Views: 4,327
Posted By Scone
Re: [ASK] Does these lines have risk to exploit?

You don't seem to be calling SQL_FetchRow in Callback_Verify_Two. You have to call it before using any of the SQL_FetchString/etc functions.
Forum: Off-Topic 10-17-2011, 15:52
Replies: 23
Views: 3,857
Posted By Scone
Re: Logical help needed

I suggested before that you multiply it by some fixed base number of points. For example, you could set the baseline to 10 points, so that when a player kills someone of the same skill, they get 1 x...
Forum: Scripting 10-17-2011, 09:51
Replies: 7
Views: 3,372
Posted By Scone
Re: Push player away from center

To invert a vector you just negate all of the components (i.e. v[0] = -v[0], etc). You can use the NegateVector function to do this automatically.
Forum: Off-Topic 10-17-2011, 09:41
Replies: 23
Views: 3,857
Posted By Scone
Re: Logical help needed

Also, ^ doesn't mean "power" in SM, you have to use the Pow function.
Forum: Off-Topic 10-17-2011, 09:40
Replies: 23
Views: 3,857
Posted By Scone
Re: Logical help needed

I think the problem is that the difference isn't being implicitly converted to a float, it's just being tagged as one.

Personally, I would make iSkill a floating point value, and only round it...
Forum: Off-Topic 10-16-2011, 18:43
Replies: 23
Views: 3,857
Posted By Scone
Re: Logical help needed

No problem, hope it works out.
Forum: Off-Topic 10-16-2011, 18:28
Replies: 23
Views: 3,857
Posted By Scone
Re: Logical help needed

Nope. 0 - 0 = 0, and x^0 = 1 (no matter what x is).

Basically, if two players have the same skill, the multiplier will always be 1, even if they both have zero skill.
Forum: Off-Topic 10-16-2011, 18:18
Replies: 23
Views: 3,857
Posted By Scone
Re: Logical help needed

You could just knock one of the zeroes off and use 1.005 instead of 1.0005. You can experiment a bit with Wolfram Alpha (or a calculator). But I think skill values in the 1000's would be better...
Forum: Off-Topic 10-16-2011, 17:24
Replies: 23
Views: 3,857
Posted By Scone
Re: Logical help needed

Okay, here's a much better system to find a multiplier.

Take the difference between the victim and the killer's skills. For example, 5000 - 1000 = 4000.

Then take a number slightly larger than...
Forum: Off-Topic 10-16-2011, 17:02
Replies: 23
Views: 3,857
Posted By Scone
Re: Logical help needed

I think the simplest way would just be to divide the victim's skill by the killers skill to get a multiplier.

Let's say the victim's skill is 5000, and the killer's skill is 1000. 5000/1000 = 5,...
Forum: Scripting 10-15-2011, 15:00
Replies: 23
Views: 4,327
Posted By Scone
Re: [ASK] Does these lines have risk to exploit?

It's just convention, it doesn't matter too much in this case.
Forum: Scripting 10-15-2011, 13:48
Replies: 1
Views: 728
Posted By Scone
Re: SQL code

There are a few problems with that code - it allows SQL injection (an exploit allowing players to take control of your database) through the player's name, and because it doesn't use threading it...
Forum: Scripting 10-15-2011, 13:43
Replies: 23
Views: 4,327
Posted By Scone
Re: [ASK] Does these lines have risk to exploit?

That piece of code won't work - SQL_TQuery doesn't return anything.

I've rewritten the plugin so that it uses threading. I've ordered the functions/callbacks such that everything happens in the...
Showing results 1 to 25 of 325

 
Forum Jump

All times are GMT -4. The time now is 02:59.


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