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 22/09/2019, 08:32 AM
Replies: 4
Views: 104
Posted By Calisthenics
Re: Help with mysql

Use mysql_query (non-threaded) in `OnGameModeInit`. This will allow all necessary stuff to be loaded before any player connects.
Forum: Scripting Help 17/09/2019, 04:26 PM
Replies: 6
Views: 166
Posted By Calisthenics
Re: Detect if player is on water

SendClientCheck(playerid, 0x2, 0x0, 0x0, 0x2);

and in `OnIncomingRPC` with rpcid 103:

new address, length;

BS_ReadValue(bs, PR_UINT8, length, PR_INT32, address);

if (length ==...
Forum: Scripting Help 17/09/2019, 03:07 PM
Replies: 4
Views: 105
Posted By Calisthenics
Re: I need int color convert transparent color function

https://wiki.sa-mp.com/wiki/Color_list#Doing_math
more specifically, this line:

newcolor = (oldcolor & ~0xFF) | alpha;
Forum: Scripting Help 08/09/2019, 07:14 AM
Replies: 15
Views: 259
Posted By Calisthenics
Re: Commands taking quite a long time to perform

If debug level in mysql_log is ALL, it will be slower. Change to ERROR | WARNING.
mysql_query sends a non-threaded query. The slower the query, the more the server will "hang". Use threaded queries.
Forum: Scripting Help 07/09/2019, 09:28 AM
Replies: 4
Views: 125
Posted By Calisthenics
Re: Help, Bucle Iterator.

When setting Tipo_ to 1 to remove from iterator, get the next item to re-set after removal:

if(Autos[ BucleAutos_ ][aPropSQLID] != 0 && Autos[ BucleAutos_ ][aPropSQLID] == Jugador[playerid][ID])...
Forum: Scripting Help 07/09/2019, 09:00 AM
Replies: 4
Views: 91
Posted By Calisthenics
Re: Mysql is not deleting

Not true.

https://wiki.sa-mp.com/wiki/MySQL/R40#mysql_tquery

Callback parameter is by default empty which may or may not accept a public function.
Forum: Scripting Help 06/09/2019, 12:30 PM
Replies: 4
Views: 91
Posted By Calisthenics
Re: Mysql is not deleting

No matches are found by comparing the x value. Set a column as id (primary key and auto increment) to identify atms.
Forum: Includes 04/09/2019, 11:47 AM
Replies: 15
[Include] GeoLite
Views: 3,196
Posted By Calisthenics
Re: GeoLite

Databases were updated for September 2019: https://github.com/George480/geolite/releases/tag/v11.0
Forum: Scripting Help 29/08/2019, 06:25 PM
Replies: 1
Views: 72
Posted By Calisthenics
Re: problem with mysql_format()

Specifier "u" accepts full/part of name or id and expects an integer variable (for online players only). Since the player might not be online, you need to use "s" specifier for string input. Amount...
Forum: Server Support 29/08/2019, 10:45 AM
Replies: 2
Views: 151
Posted By Calisthenics
Re: How to make a System Register/Login and connect MySQL?

https://forum.sa-mp.com/showthread.php?t=644891

https://raw.githubusercontent.com/pBlueG/SA-MP-MySQL/master/example_scripts/login_system-cache.pwn
Forum: Scripting Help 29/08/2019, 10:42 AM
Replies: 10
Views: 194
Posted By Calisthenics
Re: Fix error

https://wiki.sa-mp.com/wiki/Limits

Caption is limited to 64 characters, reduce the underscores used. You can also use ternary operator to avoid extra strings:


CMD:licenses(playerid, params[])...
Forum: Scripting Help 28/08/2019, 12:25 PM
Replies: 9
Views: 130
Posted By Calisthenics
Re: sscanf + zcmd

You need to place IsPlayerConnected check after sscanf line. Take a look at darkdrago's code and find the differences with yours. You declared all the variables at the top of the command and if an...
Forum: Scripting Help 28/08/2019, 11:39 AM
Replies: 9
Views: 130
Posted By Calisthenics
Re: sscanf + zcmd

Reversing this:

if (PlayerInfo[playerid][pAdmin] >= 2 || PlayerInfo[playerid][pHelper] >= 3)
{
// code
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Nu esti autorizat...
Forum: Scripting Help 26/08/2019, 07:14 AM
Replies: 3
Views: 80
Posted By Calisthenics
Re: How to use crashdetect_log

Yes, in server.cfg:

crashdetect_log crashdetect_log.txt

it will create the file automatically in root directory when a run time error or crash occur.
Forum: Scripting Help 25/08/2019, 04:37 PM
Replies: 3
Views: 85
Posted By Calisthenics
Re: MySQL help

https://wiki.sa-mp.com/wiki/MySQL/R40

cache_get_value and cache_get_value_* functions are overloaded macros that accept either a column name as string (calls cache_get_value_name and...
Forum: Scripting Help 25/08/2019, 08:26 AM
Replies: 6
Views: 207
Posted By Calisthenics
Re: Timer backtrace

If players can surf on a vehicle without a driver, then you have to ensure that pid is not equal to INVALID_PLAYER_ID before using it in togsurf array.

Consider splitting the code in your timer,...
Forum: Scripting Help 24/08/2019, 04:43 PM
Replies: 7
Views: 143
Posted By Calisthenics
Re: help me

Include fixes.inc right after a_samp.inc and before anything else.
Forum: Scripting Help 24/08/2019, 09:51 AM
Replies: 9
Views: 137
Posted By Calisthenics
Re: Undefined Symbol even when I have defined it

When you do this

#include <a_samp>

#if defined FILTERSCRIPT
new some_variable;
#endif

main()
{
Forum: Scripting Help 24/08/2019, 07:24 AM
Replies: 2
Views: 109
Posted By Calisthenics
Re: (Doubt): Why I get this error

BlockIpAdress was added in 0.3z R2-2 so you have an even older version.
Forum: Scripting Help 23/08/2019, 10:21 AM
Replies: 12
Views: 158
Posted By Calisthenics
Re: owners chat problem

If the function is not called from other scripts, making a public function has no purpose.

Find and remove:

forward SendAdminMessage(color, string[]);


Replace the public function with
...
Forum: Scripting Help 23/08/2019, 10:07 AM
Replies: 12
Views: 158
Posted By Calisthenics
Re: owners chat problem

The code you sent calls the function, you need to post the function itself. CTRL+F and search for SendAdminMessage until you find something similar to the above example.
Forum: Scripting Help 23/08/2019, 10:00 AM
Replies: 12
Views: 158
Posted By Calisthenics
Re: owners chat problem

No, I mean the code for the function. An example:


SendAdminMessage(color, message[])
{
// loop through players, check if they are admins and send message
}
Forum: Scripting Help 23/08/2019, 09:48 AM
Replies: 12
Views: 158
Posted By Calisthenics
Re: owners chat problem

Post code for SendAdminMessage function.
Forum: Scripting Help 23/08/2019, 09:46 AM
Replies: 20
Views: 296
Posted By Calisthenics
Re: changename

If the file is still opened or no permission to delete the file, fremove will return 0. Also it adds a new line with Nombre because the first line has in front so it thinks they are two different...
Forum: Scripting Help 23/08/2019, 09:37 AM
Replies: 12
Views: 158
Posted By Calisthenics
Re: owners chat problem

SendAdminMessage sends to all, add a level parameter and send to those whose level is >= the specified level.

strtok is REALLY outdated and comparing each command with strcmp. Consider using a...
Showing results 1 to 25 of 500

 

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


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