SA-MP Forums

Go Back   SA-MP Forums > Search Forums

Showing results 1 to 25 of 500
Search took 0.01 seconds.
Search: Posts Made By: Calisthenics
Forum: Scripting Help 18/05/2019, 07:51 AM
Replies: 1
Views: 59
Posted By Calisthenics
Re: [Help] MySQL Update

You call `cache_get_value_int` function but do you execute a SELECT query before?

When a player registers, send an INSERT query and specify a callback in `mysql_tquery`. Retrieve generated value...
Forum: Scripting Help 16/05/2019, 10:43 AM
Replies: 5
Views: 139
Posted By Calisthenics
Re: how to get data from query

You cannot get the result directly with threaded queries.

Move format and SendClientMessage in `OnLoadVeh` callback. Pass `playerid` in the callback and don't use global variables like that. If...
Forum: Includes 08/05/2019, 11:24 AM
Replies: 10
[Include] GeoLite
Views: 2,014
Posted By Calisthenics
Re: GeoLite

Databases were updated for May 2019: https://github.com/George480/geolite/releases/tag/v7.0
Forum: Includes 04/04/2019, 01:30 PM
Replies: 10
[Include] GeoLite
Views: 2,014
Posted By Calisthenics
Re: GeoLite

IsIpProxy and IsPlayerUsingProxy functions were only working with country database. It is now possible to use them with city database in case the country database is not used. Re-download at:...
Forum: Includes 06/03/2019, 06:09 PM
Replies: 10
[Include] GeoLite
Views: 2,014
Posted By Calisthenics
Re: GeoLite

Databases were updated for March 2019: https://github.com/George480/geolite/releases/tag/v5.0





Thank you for using it.
Forum: Scripting Help 02/03/2019, 09:49 AM
Replies: 3
Views: 85
Posted By Calisthenics
Re: /clan -members

You should use more tables, one for `gangs` and one for `gang_members`.
You should use threaded queries.
You should use an include that takes care of languages. Modifying many places in case you...
Forum: Scripting Help 02/03/2019, 09:21 AM
Replies: 3
Views: 85
Posted By Calisthenics
Re: /clan -members

You execute query and delete cache. You never retrieve data with cache functions.

R33: https://wiki.sa-mp.com/wiki/MySQL/R33#cache_get_field_content
R40:...
Forum: Scripting Help 23/02/2019, 02:09 PM
Replies: 4
Views: 129
Posted By Calisthenics
Re: Help with crashdetect

Does SAMPSON plugin fail to load?

You need to update samp server and includes too. `IsValidActor` and `GetPlayerPoolSize` functions were added in 0.3.7
Forum: Scripting Help 22/02/2019, 02:20 PM
Replies: 9
Views: 320
Posted By Calisthenics
Re: Array out of bounds!

The problem is in a function that is called in `OnPlayerClickPlayerTextDraw` callback. The only time I have seen indexes this high is when using `random` function with value smaller than 1.
Forum: Scripting Help 21/02/2019, 08:00 PM
Replies: 4
Views: 160
Posted By Calisthenics
Re: How could I find the error line?

The same run time error but more detailed logs. Unless you did not do the steps correctly or you use another editor (not pawno).



Yes. Print messages:

LoadCharacterData(playerid);...
Forum: Scripting Help 21/02/2019, 08:10 AM
Replies: 4
Views: 160
Posted By Calisthenics
Re: How could I find the error line?

https://github.com/Zeex/samp-plugin-crashdetect/wiki/Compiling-scripts-with-debug-info

After compiling the script with -d3 flag, wait for it to happen again. It will log the function name and...
Forum: Scripting Help 21/02/2019, 08:04 AM
Replies: 5
Views: 188
Posted By Calisthenics
Re: [MySQL] Storing data without duplicates.

There is internal check which makes WHERE invalid, my mistake.


format(query, sizeof(query),
"INSERT INTO `"MYSQL_PREFIX"aop`...
Forum: Scripting Help 20/02/2019, 03:07 PM
Replies: 3
Views: 105
Posted By Calisthenics
Re: Looping

Comparing against an empty string will return 0.


if(!isnull(vpncountry[i]) && !strcmp(country, vpncountry[i]))


If you ever change the size of `vpncountry` and not remember to change the...
Forum: Scripting Help 20/02/2019, 02:32 PM
Replies: 5
Views: 126
Posted By Calisthenics
Re: Server doesn't start, mysql errors

Updating the three plugins I mentioned will not suddenly make mysql plugin to load. The solution is in the link I posted.
Forum: Scripting Help 20/02/2019, 02:25 PM
Replies: 5
Views: 188
Posted By Calisthenics
Re: [MySQL] Storing data without duplicates.

The UNIQUE KEY must be on two columns together (pid, slot) and not one key for each one of them. This allows you to have unique pairing and use INSERT INTO .. ON DUPLICATE syntax which executes an...
Forum: Scripting Help 20/02/2019, 02:01 PM
Replies: 5
Views: 126
Posted By Calisthenics
Re: Server doesn't start, mysql errors

https://github.com/pBlueG/SA-MP-MySQL#faq
Read fifth question.

Crashdetect, sscanf and streamer plugin are outdated.
Forum: Everything and Nothing 20/02/2019, 01:08 PM
Replies: 63
Views: 3,496
Posted By Calisthenics
Re: Selling/Buying, Maps/Scripts? Is it legal?

http://www.sa-mp.com/samp-license.txt



According to the license, they do not have the right. Many servers violate these terms.
Forum: Scripting Help 20/02/2019, 12:50 PM
Replies: 10
Views: 248
Posted By Calisthenics
Re: OnPlayerDeath function not being called

When a run time error occurs in `OnPlayerDeath` callback from groups.inc, it breaks the hook chain and makes the public function from the gamemode not to be called.

What is the problem with...
Forum: Scripting Help 20/02/2019, 07:23 AM
Replies: 1
Views: 131
Posted By Calisthenics
Re: Load gang zones problem

Auto increment ID is not meant to be used as array index. It is just a database identifier! Use `x` as array index and start the loops from index 0.

You should also have a global variable to know...
Forum: Scripting Help 20/02/2019, 07:16 AM
Replies: 2
Views: 98
Posted By Calisthenics
Re: the logic of a value in a variable

There are already 5 items with size of MAX_VEHICLES, what is the problem with one more?

There is y_malloc include but you should not care this much about such things. They say premature...
Forum: Scripting Help 19/02/2019, 12:33 PM
Replies: 4
Views: 116
Posted By Calisthenics
Re: one short question

How is it not needed? If the server contains 50k registered players, would you open 50k files (with a FileManager plugin obviously) just to read their admin level? SQL would only need a simple query...
Forum: Scripting Help 19/02/2019, 08:57 AM
Replies: 4
Views: 129
Posted By Calisthenics
Re: Help with crashdetect

The message about the array size is missing. Is it older version of crashdetect plugin or did you not paste full logs? If crashdetect plugin version is not 4.19.4 please update the plugin...
Forum: Scripting Help 18/02/2019, 05:08 PM
Replies: 4,122
Views: 579,884
Posted By Calisthenics
Re: Little coding questions - For general minor queries 5

The design is OK. If you set pid+slot as UNIQUE key, you can use INSERT INTO .. ON DUPLICATE.



Exactly, it is a bad idea.
Forum: Everything and Nothing 18/02/2019, 12:37 PM
Replies: 63
Views: 3,496
Posted By Calisthenics
Re: Selling/Buying, Maps/Scripts? Is it legal?

If I wanted to buy a map that was created using the MT@ editor and the file is .map extension (xml), I could not do it because the data will be used in a native function that was created by sa-mp...
Forum: Plugin Development 18/02/2019, 07:25 AM
Replies: 31
Views: 19,339
Posted By Calisthenics
Re: Pawn.Regex - full support of regular expressions

First method: group begin-end and concatenate them.


main()
{
new Regex: r = Regex_New("^(.+?)?Test\\s(.+?)?$");

if (r)
{
new RegexMatch: m,
Showing results 1 to 25 of 500

 

All times are GMT. The time now is 08:30 PM.


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