Search Results
Replace INVALID_MODEL_ID with whatever GetVehicleModelIDFromName returns when it can't find a matching model. If you're not sure then just use pawn Код: if(modelid > 611 || modelid < 400) { ...
557
Quote: Originally Posted by _❼_ The old one, I thought I'd start off with the original one, thought it might be easier to learn/implement? The plugin has more features, better docume...
557
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): pawn Код: CMD:v(playerid, params[]...
557
Quote: Originally Posted by TMasters.ProRP we tested sortings in our school with 100000 numbers, for seledtion sort it too 40000ms (40sec) and for merge and quick arround 34ms, so you say ...
240
pawn Code: /** *  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 in...
148
Why would you use bubble sort? ****** posted a quick sort function here. For 10000 sorts Bubble sort: 12307 ms Quick sort: 1685 ms pawn Код: #include <a_samp>#define ITTERATIONS     1000...
240
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 same...
75
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.
243
Just select all the columns you want. [code=SQLite] INSERT INTO `table` SELECT `col1` , `col2`, `col3` , `col4` , `col5` , `col6` FROM `old_table` [/code] etc...
152
Lets say you had the following table [code=SQLite] CREATE TABLE IF NOT EXISTS `users` ( `name` TEXT NOT NULL PRIMARY KEY COLLATE NOCASE , `money` INTEGER NOT NULL DEFAULT 0 , `unusedcolumn` ); INSERT ...
152
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 queries....
152
You could use the sqlite date functions. pawn Code: new DB:db = db_open("tmp.db");if(db) {    new string[80];    format(string, sizeof(string), "SELECT ifnull(julianday('%s', 'utc') - julianday('...
279
You open databases and don't close them, maybe samp has a limit on the number of databases that can be open, or the number of connections to a database or something. You might also want to look at th...
260
Sounds like the database is locked, maybe you're forgetting to end a transaction somewhere.
260
The way I did this was to store name/IP pairs. I'm not if there's a better way but it seems to fit sqlite quite well. It also means you can store stuff like the last time they were online, and the tot...
75
Perhaps use a trigger. [code=sql] CREATE TRIGGER IF NOT EXISTS trg_logstuff AFTER INSERT ON `table1` BEGIN INSERT INTO `table2` ( `col1` , `col2` ) VALUES ( new.`col1` , new.`col2` ); END [/code]
122
I don't think you understand what the two numbers are... http://pastebin.com/f742d17c6
114
Neither of those will work properly; the first will not work for parts of a player's name, and the second will not return true for "/spec off" (id will just be set to INVALID_PLAYER_ID). pawn Ко...
109
You should probability make `name` the primary key or at least make it unique, otherwise you will end up with multiple entries with the same name. You should also use UPDATE when possible (if `name` i...
159
Returning a copy of the string might not be the best way since it limits the length of strings the function will work on. I'm not sure if this is exactly what you want since you stop at tabs but oh we...
123