SA-MP Forums

Go Back   SA-MP Forums > Search Forums

Showing results 1 to 25 of 500
Search took 0.06 seconds.
Search: Posts Made By: Y_Less
Forum: Scripting Help 21/06/2018, 01:30 PM
Replies: 15
Views: 375
Posted By Y_Less
Re: BitArray vs bool

That's not evidence of speed.

And even if you're right, the difference is going to be microscopic, so much so that's it's absolutely not worth worrying about. Unless you have extensively profiled...
Forum: Scripting Help 20/06/2018, 07:16 PM
Replies: 15
Views: 250
Posted By Y_Less
Re: How to divide gamemode in INCLUDES?

And I guarantee you that they ignored this:



At least, if not pretty much all the points I said.

The point of modularisation is to separate code. If it is still merged, then you're not...
Forum: Scripting Help 20/06/2018, 05:37 PM
Replies: 15
Views: 250
Posted By Y_Less
Re: How to divide gamemode in INCLUDES?

It's not a terrible idea, you are still splitting the code up, it is just two things to remember instead of one, so slightly more error prone if you forget to add the call.



Because it is very...
Forum: Scripting Help 20/06/2018, 04:37 PM
Replies: 15
Views: 250
Posted By Y_Less
Re: How to divide gamemode in INCLUDES?

Unfortunately you're right, it is not a common idea. However, it is a GREAT idea!

There's quite a lot to it, I might have to write a tutorial, since it is very much best practice, but in short:
...
Forum: Scripting Help 20/06/2018, 02:00 PM
Replies: 15
Views: 375
Posted By Y_Less
Re: BitArray vs bool

It is a myth that bit arrays are slower, they are just better at different things. So yes, in some cases they can be slower, but in other cases they can be around 32x times faster because they allow...
Forum: Scripting Help 20/06/2018, 01:43 PM
Replies: 4
Views: 97
Posted By Y_Less
Re: Any solution?

Split your mode up to not be a single stupidly long file. Aim for maybe 1000 lines max per module, and keep unrleated functionality separate. So for example if you have a wanted system, put that in...
Forum: Scripting Help 20/06/2018, 12:32 PM
Replies: 2
Views: 46
Posted By Y_Less
Re: Timer problem, get stuck

1) Update y_iterate - you're using a version about 10 years out of date (literally 10 years).

2) Install the crash-detect plugin and see what it says.
Forum: Bug Reports 18/06/2018, 01:02 PM
Replies: 18
Views: 662
Posted By Y_Less
Re: PSA: OnFilterScript* Events Not Thread Safe

The SA:MP console doesn't use "SendRconCommand", it has a separate thread listening for user input (typed directly in to the console window). The main difference is that plugins go through pawn, and...
Forum: Bug Reports 18/06/2018, 11:30 AM
Replies: 18
Views: 662
Posted By Y_Less
Re: PSA: OnFilterScript* Events Not Thread Safe

List of affected callbacks, and the console commands used to trigger them:

OnFilterScriptInit - "loadfs", "reloadfs"
OnFilterScriptExit - "unloadfs", "reloadfs", "exit"
OnPlayerDisconnect -...
Forum: Scripting Help 18/06/2018, 08:07 AM
Replies: 6
Views: 174
Posted By Y_Less
Re: Breaking string lines inserting spaces

This was a bug introduced in I believe 3.10.7, so don't use that version.

Edit: Apparently 3.10.6 (see post below).

Edit 2: I was right first time (but I wasn't certain initially, I just knew...
Forum: Scripting Help 17/06/2018, 05:08 PM
Replies: 10
Views: 185
Posted By Y_Less
Re: Strange float values

1) Why are you storing the data in a string like that and using sscanf? That entirely defeats the point of using SQL in the first place - put the data in separate columns and query it correctly.
...
Forum: Bug Reports 17/06/2018, 01:27 PM
Replies: 8
Views: 1,728
Posted By Y_Less
Re: Default skin became 48 instead of CJ

48 is the ASCII code for the '0' character. Did you do:

AddPlayerClass('0', ...

Instead of:

AddPlayerClass(0, ...
Forum: Scripting Help 17/06/2018, 12:56 PM
Replies: 6
Views: 204
Posted By Y_Less
Re: #emit crash

This sounds like an issue with a poorly designed database schema, more than a problem with emit. But it sounds like you just need a loop:


strcat(query, Functions[i]); // Why does that start...
Forum: Scripting Help 15/06/2018, 10:50 AM
Replies: 6
Views: 204
Posted By Y_Less
Re: #emit crash

You don't even need emit for that any more:


SendMessage(playerid, fmt[], ...)
{
new dest[144];
format(dest, sizeof (dest), fmt, ___(2));
SendClientMessage(playerid, COLOUR_RED,...
Forum: Scripting Help 15/06/2018, 09:28 AM
Replies: 6
Views: 204
Posted By Y_Less
Re: #emit crash

Why are you writing this in assembly? What are you trying to achieve? For the vast majority of cases you just don't need this, and there is very little support if you don't know what you're doing.
...
Forum: Scripting Help 14/06/2018, 11:29 AM
Replies: 11
Views: 288
Posted By Y_Less
Re: Very large amx size

You're absolutely right that you shouldn't waste it. So why leave it sitting there empty and unused - surely that's the biggest waste of RAM. If it's there, take advantage.
Forum: Scripting Help 14/06/2018, 11:27 AM
Replies: 16
Views: 274
Posted By Y_Less
Re: Error with udb_hash

Just stop using that function entirely. Switch to BCrypt.
Forum: Scripting Help 14/06/2018, 08:16 AM
Replies: 11
Views: 288
Posted By Y_Less
Re: Very large amx size

What sort of 1980s computer are you running on where 5mb is considered very large? Maybe if you are having trouble storing that you should splash out and buy 4 floppy disks to give yourself an extra...
Forum: Scripting Help 12/06/2018, 04:55 PM
Replies: 6
Views: 172
Posted By Y_Less
Re: Easy ask

Put it in a filterscript and add this to the command:


SendRconCommand("unloadfs one_time_cmd");


Save the file as "one_time_cmd.pwn" and load it with "loadfs one_time_cmd".
Forum: Scripting Help 12/06/2018, 02:26 PM
Replies: 9
Views: 162
Posted By Y_Less
Re: Tag Mismatch

That's not a joke. Why is everything in one monolithic file?
Forum: Scripting Help 12/06/2018, 12:48 PM
Replies: 7
Views: 143
Posted By Y_Less
Re: OnPlayerTakeDamage

If anything, a simple error like this is the best way to learn about proper debugging techniques. So no, it might not be needed, but it's good practice.
Forum: Scripting Help 12/06/2018, 12:20 PM
Replies: 15
Views: 331
Posted By Y_Less
Re: Password hashing

Password hashes should be hard to crack. Very very hard to crack. This means they should be slow to calculate. If they take 100ms to hash one password that's nothing to a person. You aren't going...
Forum: Scripting Help 12/06/2018, 11:33 AM
Replies: 15
Views: 331
Posted By Y_Less
Re: Password hashing

`udb_hash` was outdated before it was written. Literally. It is based on a hash algorithm that was never meant to be used for passwords.





No
Forum: Scripting Help 11/06/2018, 08:28 PM
Replies: 5
Views: 75
Posted By Y_Less
Re: CallRemoteFunction tag mismatch

Floats are "Float", that's why they work.
Forum: Includes 11/06/2018, 06:02 PM
Replies: 16
Views: 3,581
Posted By Y_Less
Re: Plugin-free strftime!

There's a video I like to post a lot about this as well. It's this one (https://www.youtube.com/watch?v=-5wpm-gesOY).
Showing results 1 to 25 of 500

 

All times are GMT. The time now is 11:51 PM.


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