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: Server Support 25/01/2020, 07:24 PM
Replies: 5
Views: 190
Posted By Calisthenics
Re: How To SetHealth ?

https://wiki.sa-mp.com/wiki/Function:SetPlayerHealth


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



It is converted to float but why? Treat parameters the way they are and do not rely on the...
Forum: Scripting Help 25/01/2020, 04:25 PM
Replies: 2
Views: 66
Posted By Calisthenics
Re: Problem Register

Because single quotes are required around string specifiers '%s'

BUT:
- You do not hash passwords, huge mistake.
- You do not escape user input (with '%e') to prevent sql injection.
- You do...
Forum: Scripting Help 25/01/2020, 03:49 PM
Replies: 4
Views: 68
Posted By Calisthenics
Re: Driving School /exam command errors

Oh, I see. You forgot the parenthesis and parameter for `GetPlayerMoney` function.

if(GetPlayerMoney(playerid) >=500)
Forum: Scripting Help 25/01/2020, 03:45 PM
Replies: 4
Views: 68
Posted By Calisthenics
Re: Driving School /exam command errors

What are the errors?

First, remove the semicolon at the end of `if` statement:

if(IsPlayerInRangeOfPoint(playerid, 5.0, 1488.7733,1305.5499,1093.2964));
Forum: Scripting Help 25/01/2020, 08:56 AM
Replies: 5
Views: 159
Posted By Calisthenics
Re: #emit

https://forum.sa-mp.com/showthread.php?t=308670
https://forum.sa-mp.com/showthread.php?t=570930
https://forum.sa-mp.com/showthread.php?t=591705

For more, read about Assembly x86
Forum: Scripting Help 23/01/2020, 07:49 AM
Replies: 6
Views: 230
Posted By Calisthenics
Re: [CreateDynamic3DTextLabel] Mixing Each Other

Post anything related to updating the label text.
Forum: Scripting Help 22/01/2020, 07:12 PM
Replies: 10
Views: 201
Posted By Calisthenics
Re: Comparing names in an enum

The problem is that you return inside the loop which breaks the next iterations.

- You own apartment 3.
- Loop starts, you do not own the first apartment so it stops the loop.

You have to let...
Forum: Scripting Help 21/01/2020, 08:27 PM
Replies: 1
Views: 75
Posted By Calisthenics
Re: MySQL not uploading data to my database, XAMPP

logs\plugins\mysql.log file should be more detailed.

The size of `stringq` is small, make it at least 70+
Always use single quotes for text, change to '%s' (or '%e' if you escape any user input...
Forum: Scripting Help 19/01/2020, 04:31 PM
Replies: 2
Views: 123
Posted By Calisthenics
Re: MySQL Query Help

result = mysql_query(1, query);

should be with correct tag of MySQL:

result = mysql_query(MySQL: 1, query);
// or
result = mysql_query(MYSQL_DEFAULT_HANDLE, query);

Or you can store the...
Forum: Scripting Help 19/01/2020, 09:06 AM
Replies: 2
Views: 114
Posted By Calisthenics
Re: I need help for this script :( !!

GivePlayerMoney(playerid, money);
FinalJob[playerid];

If `FinalJob` is a function, it needs to be (playerid). If it is a variable, you need to set a value for it.

Warning 211 tells you that...
Forum: Scripting Help 18/01/2020, 09:20 AM
Replies: 7
Views: 150
Posted By Calisthenics
Re: detecting the direction of the shooter from who receive the damage

It is passed by reference, it does not return a string but a success (anything non-zero, basically `strcat` returns the new length) or failure (0).

new string[64], direction[17];
...
Forum: Scripting Help 17/01/2020, 02:36 PM
Replies: 2
Views: 81
Posted By Calisthenics
Re: Factions aren't loading

- Avoid declaring strings/arrays inside loops. It declares a string of size 2048 in every iteration.
- Assign directly to array using the mysql functions with the last parameter:
...
Forum: Scripting Help 17/01/2020, 07:23 AM
Replies: 12
Views: 178
Posted By Calisthenics
Re: MySQL not saving Price, Type, Locked Balance ETC

There is a limit for local strings/arrays until run time 3 is given. Declaring `querylist` as static local is one solution but you should really remove unnecessary characters. You only need ` ` for...
Forum: Scripting Help 16/01/2020, 07:39 PM
Replies: 12
Views: 178
Posted By Calisthenics
Re: MySQL not saving Price, Type, Locked Balance ETC

https://github.com/pawn-lang/compiler/releases

Version 3.10.9 fixes const-correctness which will most likely give warnings for incorrect code (you have to fix them) but version 3.10.8 will not.
Forum: Scripting Help 16/01/2020, 07:26 PM
Replies: 12
Views: 178
Posted By Calisthenics
Re: MySQL not saving Price, Type, Locked Balance ETC

Get the community compiler, the limit is increased x8 (4095 characters per line).
Forum: Scripting Help 16/01/2020, 06:52 PM
Replies: 12
Views: 178
Posted By Calisthenics
Re: MySQL not saving Price, Type, Locked Balance ETC

Compiler errors? You should be using the community compiler which increases the character limit per line: https://github.com/pawn-lang/compiler/releases

Remove any unnecessary character, set...
Forum: Scripting Help 16/01/2020, 06:03 PM
Replies: 12
Views: 178
Posted By Calisthenics
Re: MySQL not saving Price, Type, Locked Balance ETC

They are threaded queries. You execute the query to insert some data and try directly to update the data when they have not been inserted yet.

The biggest question is why do you need an update...
Forum: Scripting Help 16/01/2020, 05:58 PM
Replies: 4
Views: 79
Posted By Calisthenics
Re: MySQL not updating password

Change 'Salt' to `Salt` or Salt. Using single quotes takes it as a literal string when it expected a column name.
Forum: Scripting Help 16/01/2020, 06:59 AM
Replies: 4,131
Views: 607,219
Posted By Calisthenics
Re: Little coding questions - For general minor queries 5

Use single quotes around strings '%s' and '%e'
By the way, you do not need LIMIT clause if `ID` is PRIMARY KEY (which should be).
Forum: Scripting Help 14/01/2020, 05:40 PM
Replies: 16
Views: 296
Posted By Calisthenics
Re: NEED HELP! I HAVE THIS PROBLEM

Remove nativechecker plugin, the problem was that you loaded nativechecker before streamer plugin so it gave the "errors" but if you load nativechecker plugin last you will see that the "errors" are...
Forum: Scripting Help 14/01/2020, 04:52 PM
Replies: 16
Views: 296
Posted By Calisthenics
Re: NEED HELP! I HAVE THIS PROBLEM

My guess was right, function `CreateProgressBar` caused it. Open progress.inc file and go to line 71, is it the same as the one I found on the internet?


new
barid;

for(barid = 0; barid <...
Forum: Scripting Help 14/01/2020, 01:12 PM
Replies: 16
Views: 296
Posted By Calisthenics
Re: NEED HELP! I HAVE THIS PROBLEM

It is normal for the extra info to be shown either by compiling with -d2/-d3 or when there is recursion in the code.

If you have created the file correctly and placed it to the pawno folder, it...
Forum: Scripting Help 14/01/2020, 07:49 AM
Replies: 1
Views: 97
Posted By Calisthenics
Re: I can't use the command, I get an error

The problem is in one of these functions:

is_player_spawn(playerid)

_Limuerte(playerid)

QuitarManos(playerid)

EliminarHerido(playerid)
Forum: Scripting Help 14/01/2020, 07:44 AM
Replies: 16
Views: 296
Posted By Calisthenics
Re: NEED HELP! I HAVE THIS PROBLEM

I saw the output and thought you compiled with -d3, now I realized that it was given due to the recursion.

Do you use pawno editor or any other? For pawno editor, you have to create a file named...
Forum: Scripting Help 13/01/2020, 12:18 PM
Replies: 16
Views: 296
Posted By Calisthenics
Re: NEED HELP! I HAVE THIS PROBLEM

Restart the server and wait for new [debug] logs, then post it here.
Showing results 1 to 25 of 500

 

All times are GMT. The time now is 09:35 PM.


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