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 05/04/2020, 09:27 AM
Replies: 3
Views: 75
Posted By Calisthenics
Re: If "u" specifier is number, sscanf

You would have to use a custom specifier. But why do you need to know if the input was number or string?
Forum: Scripting Help 05/04/2020, 09:20 AM
Replies: 3
Views: 60
Posted By Calisthenics
Re: error 035: argument type mismatch (argument 3)

The error is in dcc.inc file. What version of YSI do you use?

I use YSI 5 and the discord-connector.inc has const-correctness too.
Open dcc.inc and change:

//CallBacks
forward...
Forum: Scripting Help 05/04/2020, 08:58 AM
Replies: 4
Views: 71
Posted By Calisthenics
Re: Help with reports

If a file has thousands of lines, you cannot create a local string that big because run time 3 will be given. A temporary file would be needed to write the new line and then open the old file and...
Forum: Scripting Help 04/04/2020, 08:21 PM
Replies: 12
Views: 138
Posted By Calisthenics
Re: Server crash if someone disconnect

When a player disconnects, the other online players lose connection?
Do they re-connect? Does their connection close?
Have you tried an empty gamemode or grandlarc?
Comment whole...
Forum: Scripting Help 04/04/2020, 08:10 PM
Replies: 12
Views: 138
Posted By Calisthenics
Re: Server crash if someone disconnect

If the `if` statement is never true, it will not print.

You mentioned that it is like restarting, but is the server process still running? Is it localhost or hosted? I mean they might restart if...
Forum: Scripting Help 04/04/2020, 07:57 PM
Replies: 2
Views: 55
Posted By Calisthenics
Re: question with accessories

What do you exactly ask? If it is better to have accessories as constant array in script or in database? Or how to save player accessories in mysql?

A separate table with userid and the rest items...
Forum: Scripting Help 04/04/2020, 07:41 PM
Replies: 12
Views: 138
Posted By Calisthenics
Re: Server crash if someone disconnect

If it was a crash, it would create a crashlog.txt (not from crashdetect plugin).

You need to be more detailed.

Is the process of samp server still running?
If it is, what happens if you type...
Forum: Server Support 04/04/2020, 07:34 PM
Replies: 1
Views: 53
Posted By Calisthenics
Re: Run time error 20: "Invalid index parameter (bad entry point)"

Do you have `main` function in your gamemode?

main() {}
Forum: Scripting Help 04/04/2020, 10:42 AM
Replies: 6
Views: 81
Posted By Calisthenics
Re: How can I upload iterator data to callback?

Can the iterator be global? If it can, you can access it without passing it in `mysql_tquery`. Otherwise it is more complicated:

new Iterator: MyIter<100>;

...

mysql_tquery(..., "add",...
Forum: Scripting Help 04/04/2020, 09:23 AM
Replies: 2
Views: 75
Posted By Calisthenics
Re: Reading the AdminLevel from .ini

https://forum.sa-mp.com/showthread.php?t=425636
https://forum.sa-mp.com/showthread.php?t=386144
Forum: Scripting Help 04/04/2020, 09:16 AM
Replies: 3
Views: 59
Posted By Calisthenics
Re: Dialog

Display full player names in a DIALOG_STYLE_LIST. In `OnDialogResponse`, the parameter `inputtext` has the name of the selected player stored. With sscanf, you can find the player:

new targetid;
...
Forum: Scripting Help 03/04/2020, 06:11 PM
Replies: 3
Views: 52
Posted By Calisthenics
Re: What to return in OnDialogResponse?

You return 1 when the dialog is found in the script so the callback will not called in other scripts to search in there too.

Using easyDialog.inc...
Forum: Scripting Help 03/04/2020, 02:51 PM
Replies: 4
Views: 102
Posted By Calisthenics
Re: Getting the Digit of Number

getdigit(number, n)
{
// min 32-bit integer is 2147483648 (11 characters + NULL)
new strnum[12];

// `valstr` can crash the server with high values
// get the absolute value if it is...
Forum: Filterscripts 03/04/2020, 02:21 PM
Replies: 65
Views: 29,717
Posted By Calisthenics
Re: Nickk's TextDraw Editor [BETA 4.0] (iPLEOMAX Inspired)

These are the steps I followed:

Placed ntd.amx in filterscripts folder.
Placed NTD folder in scriptfiles folder.
Placed NTD_RESOURCES.txd in models\txd of GTA San Andreas folder.
Opened...
Forum: Filterscripts 03/04/2020, 01:44 PM
Replies: 65
Views: 29,717
Posted By Calisthenics
Re: Nickk's TextDraw Editor [BETA 4.0] (iPLEOMAX Inspired)

Try the new version as Nickk suggested: https://github.com/Nickk888SAMP/TextDraw-Editor/releases
Forum: Scripting Help 03/04/2020, 01:40 PM
Replies: 7
Views: 85
Posted By Calisthenics
Re: A little help with " switch"

The question is Why?

Do you think that changing if statement to switch statement will make a significant difference or make your code faster? "Premature optimization is the root of all evil"
...
Forum: Scripting Help 03/04/2020, 01:35 PM
Replies: 15
Views: 195
Posted By Calisthenics
Re: Could the "Tag mismatch" crash server?

If the script uses functions from crashdetect.inc and crashdetect plugin is not loaded, a run time error 19 is expected as it would be given with any other missing plugin.

Does the server...
Forum: Scripting Help 03/04/2020, 01:30 PM
Replies: 6
Views: 67
Posted By Calisthenics
Re: errors

Half of them never change values, some may change only once per session. Update them when they actually change.

Any input by players such emails should be escaped (specifier '%e' instead of '%s')....
Forum: Scripting Help 03/04/2020, 01:07 PM
Replies: 6
Views: 79
Posted By Calisthenics
Re: calculating players logged time

Storing the unix timestamp (what gettime() returns) when logging in and in the timer callback or on disconnect, you know how many seconds a player has been online. I only hope player gameplay time is...
Forum: Scripting Help 03/04/2020, 12:58 PM
Replies: 2
Views: 30
Posted By Calisthenics
Re: Help ( warning 213: tag mismatch )

if `Temp` is not declared as `bool:Temp`, then you have to use 0 instead of false or !VehicleInfo[i][Temp]
Forum: Scripting Help 03/04/2020, 12:45 PM
Replies: 6
Views: 79
Posted By Calisthenics
Re: calculating players logged time

When a player logins, set a per-player timer with interval 1 hour (60 * 60 * 1000). No extra calculations are needed.
Forum: General 02/04/2020, 04:04 PM
Replies: 6
Views: 252
Posted By Calisthenics
Re: Best way to learn Pawn Scripting?

Pawn Language Guide (https://github.com/compuphase/pawn/raw/master/doc/Pawn_Language_Guide.pdf)
Wiki (https://wiki.sa-mp.com/) - Functions/callbacks: description about parameters, return values,...
Forum: Scripting Help 02/04/2020, 09:46 AM
Replies: 2
Views: 90
Posted By Calisthenics
Re: y_text question

The function is static, it cannot be accessed from other files.

I have never used y_text but take a look in `Text_Format`...
Forum: Scripting Help 02/04/2020, 09:24 AM
Replies: 6
Views: 179
Posted By Calisthenics
Re: Problem with Mysql

Is the mysql service running?
Forum: Scripting Help 02/04/2020, 09:21 AM
Replies: 5
Views: 84
Posted By Calisthenics
Re: Question about string

Run Profiler Plugin (https://github.com/Zeex/samp-plugin-profiler).
Showing results 1 to 25 of 500

 

All times are GMT. The time now is 06:16 AM.


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