SA-MP Forums

Go Back   SA-MP Forums > Search Forums

Showing results 1 to 25 of 121
Search took 0.01 seconds.
Search: Posts Made By: Markski
Forum: Scripting Help 28/04/2020, 01:24 PM
Replies: 10
Views: 256
Posted By Markski
Re: which is the maximum length of a string?

Just do one query per player. I'd suggest you do it across several multiple formats though, for the sake of your mental sanity.



In order to know if something changed or not you'd probably need...
Forum: Scripting Help 28/04/2020, 11:53 AM
Replies: 10
Views: 256
Posted By Markski
Re: which is the maximum length of a string?

Having a huge query to save account flags in a single table is fine. It's not ideal, but it's *fine*. Long as you know what you're doing the worst thing that'll happen is it just being annoying to...
Forum: Scripting Help 28/04/2020, 11:45 AM
Replies: 2
Views: 94
Posted By Markski
Re: Connecting two enums together

The only way to effectivelly do this would be to use apID as the index.

Other way would be to set apID to the id on each array at the same time, and letting each enum have a cache variable to hold...
Forum: Scripting Help 28/04/2020, 11:42 AM
Replies: 1
Views: 67
Posted By Markski
Re: warning 215: expression has no effect

All of the lines on the error log are super far away from each other so the snippet you provided won't suffice. We also have no way to know which of those lines is contained in the snippet you sent....
Forum: Scripting Help 28/04/2020, 11:34 AM
Replies: 2
Views: 98
Posted By Markski
Re: Issue with DCC_OnChannelMessage (outdated callback, perhaps?)

There's no easier way since the last DCC update. It shouldn't be that hard anyways, you'll just need to fetch those two things at the top of the callback. And of course, DCC_GetMessageContent for the...
Forum: Scripting Help 14/04/2020, 11:36 AM
Replies: 4
Views: 122
Posted By Markski
Re: Time until NPC reach a point

What Runn3R said should work. Alternatively, you should take your measurement for a single cycle, and reset it everytime the bus stops in the starting place, with a vehicle checkpoint as well.
Forum: Scripting Help 05/03/2020, 11:28 PM
Replies: 4
Views: 174
Posted By Markski
Forum: Includes 11/02/2020, 10:11 PM
Replies: 6
Views: 2,901
Posted By Markski
Re: 3D Speedometer v0.2

y_hooks is optional, hence the compiler checks on _INC_y_hooks, so having that array there is necesary one way or the other.

Also, 0.3:

- Added Spanish option
- Added option to disable vehicle...
Forum: Includes 10/02/2020, 06:23 PM
Replies: 6
Views: 2,901
Posted By Markski
3D Speedometer v0.3

An easy-to-implement 3D Speedometer.

- Include with y_hooks and it will work inmediatly.
- If you don't have y_hooks then making it work is as simple as pasting a few lines of code in 4...
Forum: Scripting Help 03/02/2020, 03:24 AM
Replies: 3
Views: 150
Posted By Markski
Re: Shorten this

What's wrong with that? IMO it's the best approach for this solution.

To answer your question though, there's this:

stock bool:FALSE = false;
new scmExStr[144];
#define...
Forum: Scripting Help 02/02/2020, 02:12 PM
Replies: 5
Views: 289
Posted By Markski
Re: Server optimization

Memory sizes are meaningless for speed, lowering memory usage won't improve anything since no script will ever use more than 300mb of ram anyways.

What should concern you is performance profilings...
Forum: Scripting Help 31/01/2020, 12:41 PM
Replies: 5
Views: 294
Posted By Markski
Re: easyDialog.inc exceed heap size

If you mean the amount of heap that your script will use in the worst case scenario, the compiler says it here:



Again, this is calculated based on how much function calling depth your script...
Forum: Scripting Help 30/01/2020, 09:07 PM
Replies: 5
Views: 294
Posted By Markski
Re: easyDialog.inc exceed heap size

Heap/stack size max. usage estimations are based, mostly, on how much depth of function calls your script might fall into. Provided there is no recursion, in which case it'd theoretically be...
Forum: Server Support 30/01/2020, 01:49 AM
Replies: 1
Views: 357
Posted By Markski
Re: runtime error with streamer and sscanf

Seems the sscanf plugin requires the universal C runtime, which you can find clicking here (https://support.microsoft.com/es-es/help/2999226/update-for-universal-c-runtime-in-windows)
Forum: Scripting Help 28/01/2020, 09:59 PM
Replies: 4
Views: 270
Posted By Markski
Re: what is #pragma compress 0

Certain scripts might not compile properly with compact encoding enabled. I reckon perhaps scripts which handle strings in one way or another, but not sure.

If your script compiles correctly,...
Forum: Scripting Help 28/01/2020, 01:47 AM
Replies: 4
Views: 270
Posted By Markski
Re: what is #pragma compress 0

The "#pragma compress" directive toggles wether or not the compiler's generated bytecode will be in either compact or plain encoding. If the value is anything but zero, compact encoding is used,...
Forum: Scripting Help 26/01/2020, 09:32 PM
Replies: 2
Views: 94
Posted By Markski
Re: attach PlayAudioStream to a player?

The solution above is good, but to do it yourself, basically:

- Keep constant track of the position of the players who have ongoing streams.
- Have a player variable ("Listening") for everyone...
Forum: Scripting Help 25/01/2020, 02:07 PM
Replies: 3
Views: 153
Posted By Markski
Re: Can't press enter to enter in a building

For future reference, keep in mind using "&" instead of "==" is ideal for key state. This is because & functions as a bit-wise "and", meaning it'll check for that key being pressed instead of...
Forum: Scripting Help 24/01/2020, 10:36 PM
Replies: 5
Views: 316
Posted By Markski
Re: #emit

This is a very creative approach, I wouldn't have thought of using a macro for this. +rep
Forum: Scripting Help 24/01/2020, 08:52 PM
Replies: 5
Views: 316
Posted By Markski
Re: #emit

#emit is a way to write in-line P-Code/Bytecode (Pawn's compiled "Assembly" so to speak).

This is often done to either bypass limitations of the language, obsfucate code, increase execution speed...
Forum: Scripting Help 24/01/2020, 08:45 PM
Replies: 5
Views: 223
Posted By Markski
Re: How unique is IP?

This cannot be done with a plugin let alone an include, not without requiring players to install a mod for the server (which in my book is often a big no-no as a user). Furthermore I reckon...
Forum: Server Support 24/01/2020, 08:42 PM
Replies: 2
Views: 612
Posted By Markski
Re: Configuring Nginx to reverse-proxy SA-MP server

This one I used previously for HTTP requests, not sure if it'd work for SA-MP but might be worth a try, tweaked it a bit for your case...

server {
listen 7777;
server_name s2.name.com;
...
Forum: Scripting Help 24/01/2020, 02:29 PM
Replies: 5
Views: 223
Posted By Markski
Re: How unique is IP?

For the null amount of tools which SA-MP provides, this is a little too optimistic. But I'll let you find this out by yourself as you keep trying and researching.

As for the question, Long answer:...
Forum: Scripting Help 23/01/2020, 10:32 PM
Replies: 2
Views: 144
Posted By Markski
Re: Count strings in a file

How're you separating strings? If you're separating them one on each line, maybe you can just count the lines

new string[64], count = 0;
new File:file = fopen("houses.txt", io_read);...
Forum: Scripting Help 23/01/2020, 12:06 PM
Replies: 2
Views: 128
Posted By Markski
Re: Mapfiles not loading from scriptfiles

How about you show us the script you made to load the mapfiles from ini files?
Showing results 1 to 25 of 121

 

All times are GMT. The time now is 09:00 AM.


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