SA-MP Forums

Go Back   SA-MP Forums > Search Forums

Showing results 1 to 25 of 500
Search took 0.03 seconds.
Search: Posts Made By: Stinged
Forum: Scripting Help 08/03/2017, 07:49 PM
Replies: 9
Views: 637
Posted By Stinged
Re: help.

You're saying that he shouldn't use a variable to store the weapon id, he should instead call GetPlayerWeapon multiple times.
Forum: Scripting Help 07/03/2017, 06:31 PM
Replies: 9
Views: 637
Posted By Stinged
Re: help.

Actually no. Using a variable is much better.
You're calling GetPlayerWeapon(playerid) multiple times, while with a variable you only call it once.

What's even better is using switch...
Forum: Scripting Help 05/01/2017, 10:24 AM
Replies: 3
Views: 243
Posted By Stinged
Re: [HELP] MySQL functions

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

EDIT: Didn't reload the page, sorry.
Forum: Scripting Help 05/01/2017, 08:33 AM
Replies: 6
Views: 1,394
Posted By Stinged
Re: While Loop Problem

I'm on my phone so I can't really read the code and find the error, but do you have crashdetect installed?
Here's an example of what I mean:


new array[5];
for (new i = 0; i <= 5; i++)
{
...
Forum: Scripting Help 03/01/2017, 06:57 PM
Replies: 10
Views: 1,976
Posted By Stinged
Re: Why is this working?

Oh I see, thanks!
Forum: Scripting Help 03/01/2017, 02:14 PM
Replies: 10
Views: 1,976
Posted By Stinged
Re: Why is this working?

It's not really a problem since I never actually do that, but it just happened by mistake and it got me wondering.
Anyway, thank you for the replies.
Forum: Scripting Help 03/01/2017, 11:32 AM
Replies: 10
Views: 1,976
Posted By Stinged
Re: Why is this working?

I'm not talking about the compiler not detecting them, I'm talking about why the array actually holds that string, even though its length is bigger than the array's size.
Forum: Scripting Help 03/01/2017, 07:52 AM
Replies: 10
Views: 1,976
Posted By Stinged
Why is this working?

new array[10];
strcat(array, "12345678901", 12); // string is 11 characters
printf("%s\nLen: %i", array, strlen(array));

Prints out:
12345678901
Len: 11


Why is that working? Attempting to...
Forum: Tutorials 31/12/2016, 10:51 AM
Replies: 22
Views: 6,777
Posted By Stinged
Re: /cuff and /uncuff Tutorial (sscanf)+(ZCMD)

Here's an even better version: (Plus some mistakes were fixes)

CMD:uncuff(playerid, params[])
{
if(gTeam[playerid] != LSPD)
return SendClientMessage(playerid, 0xFF0000FF, "[ERROR]: Only cops...
Forum: Scripting Help 29/12/2016, 09:58 AM
Replies: 6
Views: 756
Posted By Stinged
Re: OnPlayerKey

Because you're probably standing near the coordinates of the one with index = 0.
Try it with another Org (Make sure that this one still exists)
Forum: Scripting Help 29/12/2016, 06:32 AM
Replies: 6
Views: 756
Posted By Stinged
Re: OnPlayerKey

You're using "new a" which is always set to 0.
Which means you have to be close to the ATM that's occupying index 0.

You need to loop through your ATMs and check if the player is close to one of...
Forum: Scripting Help 04/12/2016, 04:07 PM
Replies: 15
Views: 3,829
Posted By Stinged
Re: Best Anti-Money Hack Method (Server Sided Money) Discussion

AC_GivePlayerMoney will give false warnings.

The order goes like this:
variable change
OnPlayerMoneyChange
GivePlayerMoney

So basically, you're calling the anticheat before giving the actual...
Forum: Scripting Help 04/12/2016, 09:19 AM
Replies: 5
Views: 340
Posted By Stinged
Re: Loading

Your loading is most likely bugged.
I'm pretty sure Vince is right about Iter_Free.

You're re-using the same index (Iter_Free returns the nearest 'free' index inside of the iterator)
If you use...
Forum: Scripting Help 03/12/2016, 06:04 PM
Replies: 2
Views: 521
Posted By Stinged
Re: How do I create a stock with optional parameters?

You should use y_text or something similar if you want to make a multi-lang system.
But to answer your question, you can try doing this:


stock SS(playerid, color, eng[], ro[] = "")
{
if...
Forum: Scripting Help 03/12/2016, 09:38 AM
Replies: 1
Views: 420
Posted By Stinged
Re: What is the meaning of != in this line

http://wiki.sa-mp.com/wiki/Control_Structures#Operators
Forum: Scripting Help 03/12/2016, 07:18 AM
Replies: 10
Views: 568
Posted By Stinged
Re: Server Crashed

Compile your script with debug info.
https://github.com/Zeex/samp-plugin-crashdetect/wiki/Compiling-scripts-with-debug-info

And post the new logs crashdetect prints.
Forum: Scripting Help 03/12/2016, 06:00 AM
Replies: 10
Views: 568
Posted By Stinged
Re: Server Crashed

Post line#89 in "fuckCleo.inc" and some lines around it.



How exactly did you conclude that? It wouldn't even compile if a curly-bracket was missing.
Forum: Scripting Help 30/11/2016, 06:25 PM
Replies: 10
Views: 681
Posted By Stinged
Re: Compiling Error

Change your definitions and includes to this:


#include <a_samp>
#include <sscanf2>
#include <YSI\y_ini>
#include <mSelection>
#include <CMD>
#include <foreach>
#undef MAX_PLAYERS
Forum: Scripting Help 30/11/2016, 06:21 PM
Replies: 4
Views: 1,201
Posted By Stinged
Re: Hex codes in text

Sorry for the late response (I didn't see the topic until now), but what the poster is talking about is embedded colors.
{0000FF}blue {FF0000}red
blue red
And he's asking if they count as...
Forum: Scripting Help 29/11/2016, 03:56 PM
Replies: 4
Views: 1,201
Posted By Stinged
Re: Hex codes in text

{FFFFFF} = 8 characters
Forum: Scripting Help 28/11/2016, 04:48 PM
Replies: 1
Views: 274
Posted By Stinged
Re: SQLite/SQL - clear all "non-used" IDs

That's how AUTO_INCREMENT works. It doesn't re-use deleted indexes, it just adds one to the last value.
Forum: Scripting Help 28/11/2016, 01:59 PM
Replies: 9
Views: 315
Posted By Stinged
Re: Litte help..

Why format though? Since there aren't any values that you're inserting (other than the first %s to add to the string), you should use strcat. It's much faster.
Forum: Includes 26/11/2016, 05:36 PM
Replies: 11
Views: 2,678
Posted By Stinged
Re: file_system [reduce memory usage - faster than y_ini!]

I'll be testing this out later, but you should add a highlighted (so it can be seen) warning,
saying that in reading (Without File_ReadEx), the order should be exactly the same.
Because if the...
Forum: Scripting Help 26/11/2016, 03:14 PM
Replies: 2
Views: 466
Posted By Stinged
Re: engine hack

I do not comprehend why it's always you that asks these types of questions...

You already know the vehicle's params, because you've just set them using SetVehicleParamsEx.
You normally need...
Forum: Scripting Help 26/11/2016, 01:17 PM
Replies: 2
Views: 230
Posted By Stinged
Re: Timers

He's only talking about fixes2's timers, and not the native timers.
Showing results 1 to 25 of 500

 

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


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