SA-MP Forums

Go Back   SA-MP Forums > Search Forums

Showing results 1 to 25 of 78
Search took 0.00 seconds.
Search: Posts Made By: Dabombber
Forum: Help Archive 25/04/2010, 11:34 PM
Replies: 29
Views: 8,384
Posted By Dabombber
Re: sscanf and multiple optional parameters

Replace INVALID_MODEL_ID with whatever GetVehicleModelIDFromName returns when it can't find a matching model. If you're not sure then just use if(modelid > 611 || modelid < 400) { again.
Forum: Help Archive 25/04/2010, 11:32 AM
Replies: 29
Views: 8,384
Posted By Dabombber
Re: sscanf and multiple optional parameters

The plugin has more features, better documentation and is faster.

The pawn version has no bounds checking, so to avoid an overflow you will need to make all the strings big enough. new car[128],...
Forum: Help Archive 25/04/2010, 02:38 AM
Replies: 29
Views: 8,384
Posted By Dabombber
Re: sscanf and multiple optional parameters

The plugin has lots of documentation http://forum.sa-mp.com/index.php?topic=145539.0.

For your command I think it would be something like this (untested sorry):

CMD:v(playerid, params[])
{...
Forum: Help Archive 20/04/2010, 11:47 AM
Replies: 15
Views: 2,748
Posted By Dabombber
Re: Sorting function

That would have been in c or something, pawn is slower. If only I had posted the code or something so you could test it yourself...
Forum: Server Support 19/04/2010, 10:23 PM
Replies: 365
Views: 99,831
Posted By Dabombber
Re: Server update: 0.3a R7

Why not test it when I say it doesn't work? I've already given examples showing how both loops do not work. If you need further convincing here's an actual test, it would be nice if you tried it...
Forum: Server Support 19/04/2010, 01:33 PM
Replies: 365
Views: 99,831
Posted By Dabombber
Re: Server update: 0.3a R7

No neither will work.

#define PlayerLoop(%0) for(new %0=0;%0<PLAYERS,IsPlayerConnected(%0);%0++) will not work (see here (http://forum.sa-mp.com/index.php?topic=161491.msg998847#msg998847))

...
Forum: Server Support 18/04/2010, 04:44 PM
Replies: 365
Views: 99,831
Posted By Dabombber
Re: Server update: 0.3a R7

I doubt it works for him, but just to be sure...


public OnFilterScriptInit()
{
printf("false,false: %i\ntrue,true: %i\nfalse,true: %i\ntrue,false: %i", (false,false), (true,true),...
Forum: Server Support 18/04/2010, 11:09 AM
Replies: 365
Views: 99,831
Posted By Dabombber
Re: Server update: 0.3a R7

This is the same as #define PlayerLoop(%0) for(new %0=0; IsPlayerConnected(%0); %0++) it will stop the loop after the first disconnected player.



Have you timed it or are you just assuming?

...
Forum: Help Archive 04/04/2010, 04:53 PM
Replies: 6
Views: 1,001
Posted By Dabombber
Re: [HELP] Finding whole words in a string?

/**
* Finds a word in a string
* @param string The string to search
* @param word The word to search for
* @param ignorecase If the search is case insensitive
* @param pos The starting...
Forum: Help Archive 02/04/2010, 06:46 AM
Replies: 15
Views: 2,748
Posted By Dabombber
Re: Sorting function

Why would you use bubble sort? ****** posted a quick sort function here (http://forum.sa-mp.com/index.php?topic=61574.msg408904#msg408904).

For 10000 sorts
Bubble sort: 12307 ms
Quick sort: 1685...
Forum: Help Archive 31/03/2010, 12:56 PM
Replies: 2
Views: 876
Posted By Dabombber
Re: Saving as hex (reading with sscanf 2.0)

I doubt there will be any noticeable difference in speed, test it if you want. File size isn't important either, 2 characters are nothing with current hard drive sizes and array sizes will be the...
Forum: Server Support 27/03/2010, 09:46 PM
Replies: 365
Views: 99,831
Posted By Dabombber
Re: Server update: 0.3a R6

Will the next client update make this work when the player is spectating another player, or not in one of the 3 vehicles with a turret?


Does this mean that bugs which do not require a client...
Forum: Help Archive 03/03/2010, 01:50 PM
Replies: 15
Views: 1,804
Posted By Dabombber
Re: [SetTimerEx] Carrying IP's Across Timers

Just pass it as an integer


SetTimerEx("DoSomething", 1000, 0, "i", IP2Code("127.0.0.1"));

forward DoSomething(ipcode);
public DoSomething(ipcode)
{
printf("IP: %s", Code2IP(ipcode));
}
Forum: Filterscripts 16/02/2010, 11:06 PM
Replies: 4,022
Views: 2,257,921
Posted By Dabombber
Re: Useful Functions

Some problems with the vehicle seats

The Sentinel has 4 seats
The AT-400 has 2 seats
I know the Andromada has at least 2, are you sure it's unlimited?
Maybe use MAX_PLAYERS for the Coach...
Forum: Bug Reports 14/02/2010, 07:07 PM
Replies: 5
Views: 4,254
Posted By Dabombber
Re: Processor affinity

This may have been to stop the game running at double speed on some amd processors. I second the request since there's a noticeable improvement after manually setting the affinity.
Forum: Help Archive 08/01/2010, 11:59 AM
Replies: 16
Views: 2,748
Posted By Dabombber
Re: [What does static time; means?] Check difference between two dates

Static local declarations

A local variable is destroyed when the execution leaves the compound block
in which the variable was created. Local variables in a function only exist
during the run...
Forum: Help Archive 08/01/2010, 11:30 AM
Replies: 16
Views: 2,748
Posted By Dabombber
Re: [Unsolved] Check difference between two dates

Maybe I'm missing something. gettime() returns: You can use this to check the difference between two times.

If they HAVE to be stored as a string instead of an integer...
Forum: Help Archive 08/01/2010, 11:24 AM
Replies: 5
Views: 1,662
Posted By Dabombber
Re: SQL DROP COLUMN problem

Just select all the columns you want.

INSERT INTO `table` SELECT `col1` , `col2`, `col3` , `col4` , `col5` , `col6` FROM `old_table`

etc...
Forum: Help Archive 08/01/2010, 10:58 AM
Replies: 16
Views: 2,748
Posted By Dabombber
Re: [Unsolved] Check difference between two dates

There is... like I said, use gettime().
Forum: Help Archive 08/01/2010, 10:57 AM
Replies: 5
Views: 1,662
Posted By Dabombber
Re: SQL DROP COLUMN problem

Lets say you had the following table

CREATE TABLE IF NOT EXISTS `users` ( `name` TEXT NOT NULL PRIMARY KEY COLLATE NOCASE , `money` INTEGER NOT NULL DEFAULT 0 , `unusedcolumn` );
INSERT INTO...
Forum: Help Archive 08/01/2010, 09:46 AM
Replies: 5
Views: 1,662
Posted By Dabombber
Re: SQL DROP COLUMN problem

Do you mean SQLite? Not all ALTER TABLE commands are supported (http://www.sqlite.org/omitted.html). Just rename the table, create it without the columns and insert the data back in, 3 simple...
Forum: Help Archive 08/01/2010, 09:42 AM
Replies: 16
Views: 2,748
Posted By Dabombber
Re: [Unsolved] Check difference between two dates

You could use the sqlite date functions (http://www.sqlite.org/lang_datefunc.html).

new DB:db = db_open("tmp.db");
if(db) {
new string[80];
format(string, sizeof(string), "SELECT...
Forum: Help Archive 04/01/2010, 11:36 PM
Replies: 25
Views: 3,197
Posted By Dabombber
Re: [UNSOLVED] SQLite, database stops responding.

SQLite should easily be able to handle that, I've had a table with about 2 million rows for testing and it worked fine (~9 seconds per lookup without an index, ~300 ms with).

Try putting

stock...
Forum: Help Archive 22/12/2009, 12:43 PM
Replies: 25
Views: 3,197
Posted By Dabombber
Re: I changed to SQLite, now accounts are being hacked

It doesn't always close the database...

new DB:userDB = db_open(Accounts_DB);

if(userDB)
{

format(query, sizeof(query), "SELECT `banned` FROM `users` WHERE `name`='%s'", Name);...
Forum: Help Archive 22/12/2009, 12:19 PM
Replies: 25
Views: 3,197
Posted By Dabombber
Re: I changed to SQLite, now accounts are being hacked

The only place (I can see) for a non-admin to inject code is with their email, and it logs that.

mysql_escape_string will NOT work with SQLite since it's for MySQL, I think it's this one


All...
Showing results 1 to 25 of 78

 

All times are GMT. The time now is 12:48 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.