SA-MP Forums

Go Back   SA-MP Forums > Search Forums

Showing results 1 to 25 of 500
Search took 0.02 seconds.
Search: Posts Made By: Calisthenics
Forum: Scripting Help 13/10/2019, 11:22 AM
Replies: 2
Views: 69
Posted By Calisthenics
Re: Stopwatch gives some weird times

You do not need a timer. Store the unix timestamp in a per-player array when the job starts:

Player_DeliveryTick[playerid] = gettime();

when the player delivers, get the current unix timestamp...
Forum: Scripting Help 13/10/2019, 10:29 AM
Replies: 11
Views: 154
Posted By Calisthenics
Re: Help Code.

The easiest way to get rid of too long input line is to use the community compiler: https://github.com/pawn-lang/compiler/releases

If you use the latest version (3.10.9) however you will need to...
Forum: Scripting Help 13/10/2019, 10:20 AM
Replies: 8
Views: 178
Posted By Calisthenics
Re: Any help with this would be greatly appreciated!

That is the problem. The script uses functions from R6-2 version.
Forum: Scripting Help 07/10/2019, 06:19 PM
Replies: 4
Views: 92
Posted By Calisthenics
Re: Function Problem

Move the forward line at the top (before functions).
Forum: Scripting Help 04/10/2019, 06:57 PM
Replies: 7
Views: 137
Posted By Calisthenics
Re: Converting from DINI to MySQL

Because INI files are meant to be used as configuration files. They are limited when it comes to statistics as it is inefficient to open and read all files.

Also do not forget that Dini came out...
Forum: Scripting Help 04/10/2019, 06:30 PM
Replies: 1
Views: 56
Posted By Calisthenics
Re: strfind question

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

Return Values:
The number of characters before the sub string (the sub string's start position) or -1 if it's not found.

If `strfind` returns a value not...
Forum: Scripting Help 03/10/2019, 05:05 PM
Replies: 3
Views: 81
Posted By Calisthenics
Re: Getting mysql_tquery: invalid connection handle '0' error

Hooked callbacks are called first. Create another module for establishing connection to the database and include it before any other module that uses mysql functions.
Forum: Scripting Help 03/10/2019, 11:11 AM
Replies: 8
Views: 209
Posted By Calisthenics
Re: Six random numbers which are not equal to each other

The other way I mentioned:

new dump_arr[46];

for (new i = 0; i < 46; i++)
{
dump_arr[i] = i; // assign value from 0 to 45 in array
}

shuffle(dump_arr); // randomly shuffle it
Forum: Scripting Help 03/10/2019, 09:10 AM
Replies: 8
Views: 209
Posted By Calisthenics
Re: Six random numbers which are not equal to each other

With YSI 5 (https://github.com/pawn-lang/YSI-Includes/tree/5.x):

new Iterator: rand_number<46>, counter;

for (new i = 0; i < 6; i++)
{
Iter_RandomAdd(rand_number); // adds 6 random...
Forum: Includes 02/10/2019, 03:24 PM
Replies: 16
[Include] GeoLite
Views: 3,371
Posted By Calisthenics
Re: GeoLite

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



You are welcome.
Forum: Scripting Help 01/10/2019, 07:11 AM
Replies: 4
Views: 144
Posted By Calisthenics
Re: ysi error USE@YSI_Storage@y_ini

It just informs you that you included y_ini without using any relevant code.
Forum: Scripting Help 24/09/2019, 05:25 PM
Replies: 13
Views: 269
Posted By Calisthenics
Re: Dynamic Checkpoint help needed

Only constant values are allowed in `case`.
Forum: Scripting Help 22/09/2019, 08:32 AM
Replies: 4
Views: 146
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: 196
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: 127
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: 282
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: 144
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: 108
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: 108
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: 16
[Include] GeoLite
Views: 3,371
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: 76
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: 193
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: 204
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: 140
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: 140
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...
Showing results 1 to 25 of 500

 

All times are GMT. The time now is 02:38 AM.


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