SA-MP Forums

Go Back   SA-MP Forums > Search Forums

Showing results 1 to 25 of 500
Search took 0.04 seconds.
Search: Posts Made By: Nero_3D
Forum: Scripting Help 04/07/2020, 06:38 PM
Replies: 5
Views: 203
Posted By Nero_3D
Re: SAMP Check: Is Vehicle DIVING?

If I am not mistaken this GetVehicleRotation did return rX (pitch), rY (roll) and rZ (yaw), so you need to check if rX is smaller or bigger 0 (not sure if diving is positive or negative)
Forum: Scripting Help 19/05/2020, 04:03 PM
Replies: 3
Views: 101
Posted By Nero_3D
Re: Duplicated

You use a local static variable but don't know what it does, read that -> https://wiki.sa-mp.com/wiki/Scripting_Basics#static_local
Forum: Scripting Help 14/05/2020, 12:22 AM
Replies: 4
Views: 141
Posted By Nero_3D
Re: Problem with sorting arrays

You need to use ".order = SORT_DESC" because order isn't the third parameter
Forum: Scripting Help 27/04/2020, 11:53 PM
Replies: 4,144
Views: 635,501
Posted By Nero_3D
Re: Little coding questions - For general minor queries 5

Took me literally one search to find it, on the second last page of the main thread attached to this reply


If it is useful, depends, packed strings are only useful if you plan to save a lot of...
Forum: Scripting Help 25/04/2020, 02:46 AM
Replies: 8
Views: 280
Posted By Nero_3D
Re: Message gang

The ganid / factionid isn't the index so you got the wrong entry

format(str, sizeof(str), "Your gang %s has taken over a territory not belonging to any gang",...
Forum: Scripting Help 23/04/2020, 07:33 PM
Replies: 10
Views: 358
Posted By Nero_3D
Re: OnNpcConnect not called

well you did break the hook chain in "clerks.pwn" by returning Y_HOOKS_BREAK_RETURN_1, therefore the second OnNpcConnect is never called, avoid breaking a hook chain and use Y_HOOKS_CONTINUE_RETURN_0...
Forum: Scripting Help 23/04/2020, 02:28 PM
Replies: 10
Views: 358
Posted By Nero_3D
Re: OnNpcConnect not called

if it gets called what did that print show you?

GetPlayerName( npcid, npc_name, sizeof( npc_name ) );
// this one \/
printf("\"%s\" == \"%s\" (%d)", npc_name, SECURE_TRUCK_DRIVER_NAME, strmatch(...
Forum: Scripting Help 23/04/2020, 01:59 AM
Replies: 4,144
Views: 635,501
Posted By Nero_3D
Re: Little coding questions - For general minor queries 5

It is somewhat explained here -> https://wiki.sa-mp.com/wiki/Scripting:tags
But to make it short it is usually used to overwrite tags

new MyTag: myvar;

if(_: myvar == 0) {
print("yay");
}
Forum: Scripting Help 23/04/2020, 01:51 AM
Replies: 10
Views: 358
Posted By Nero_3D
Re: OnNpcConnect not called

Calling the hook in an empty script works for me, so the question is, do you hook OnNpcConnect somewhere before?, did you break the hook chain somewhere?, alternatively try using a different function...
Forum: Scripting Help 21/04/2020, 12:46 PM
Replies: 10
Views: 358
Posted By Nero_3D
Re: OnNpcConnect not called

Add more prints and find out what happens

hook OnNpcConnect( npcid )
{
static
npc_name[ MAX_PLAYER_NAME ];

printf("OnNpcConnect(%d)", npcid);

GetPlayerName( npcid,...
Forum: Scripting Help 30/03/2020, 10:21 PM
Replies: 1
Views: 105
Posted By Nero_3D
Re: Pass array in SetTimerEx

I am not sure how accurate the information on the sa-mp wiki (https://wiki.sa-mp.com/wiki/SetTimerEx) is but it states that arrays and strings are not working with the default compiler
But testing...
Forum: Scripting Help 27/02/2020, 01:43 PM
Replies: 3
Views: 280
Posted By Nero_3D
Re: #include doesn't include

you could create a list file (-l in the compiler option) and see what the preprocessor does

but I think your problem is that you use forward slashes and the default compiler
Forum: Scripting Help 23/02/2020, 03:29 AM
Replies: 2
Views: 147
Posted By Nero_3D
Re: Best way to have Multiple Factions

usually you create an additional table to link both player-table and faction-table

Tutorial by Vince \/
Forum: Scripting Help 04/02/2020, 10:42 PM
Replies: 1
Views: 99
Posted By Nero_3D
Re: [Error] Native

you get the error because native is used to import external functions (build-in or from plugins) and there is no such external function
remove or comment the native to solve your problem
Forum: Scripting Help 03/02/2020, 02:19 PM
Replies: 3
Views: 151
Posted By Nero_3D
Re: Shorten this

you can use a little trick to make it faster and shorter (https://forum.sa-mp.com/showpost.php?p=2857588&postcount=4225)
Forum: Scripting Help 08/01/2020, 10:15 PM
Replies: 2
Views: 135
Posted By Nero_3D
Re: Player in queque

You need a global variable which blocks the login process, something like that

// global
new bool: SomoneIsLogginIn = false;
// OnPlayerRequestLogin - pseudo function which gets called if player...
Forum: Scripting Help 05/01/2020, 11:34 PM
Replies: 2
Views: 162
Posted By Nero_3D
Re: Fuel consumption

it would help if you could tell us what exactly is wrong and what the code is supposed to do or what you expected results are

anyways, what I currently see is that your "printf output" doesn't...
Forum: Includes 29/12/2019, 01:17 AM
Replies: 43
Views: 15,932
Posted By Nero_3D
Re: Screen to World vice versa

I renamed the master branch to test (https://github.com/Shiska/screentoworld/tree/test) because I had to fix something (https://github.com/pawn-lang/compiler/pull/454) and I didn't retest the code...
Forum: Scripting Help 20/12/2019, 01:34 AM
Replies: 3
Views: 223
Posted By Nero_3D
Re: String length (ellipses)

that should do the trick

str[26] = EOS;
strcat(str, "...");
Forum: Scripting Help 16/12/2019, 02:44 AM
Replies: 4
Views: 179
Posted By Nero_3D
Re: How to replace a text to place another one?

The compiler is unable the determine the size (with sizeof) or "message" because it is a parameter
Either pass through the size or guess the size (not recommended)
...
Forum: Scripting Help 30/11/2019, 02:03 AM
Replies: 5
Views: 269
Posted By Nero_3D
Re: On press 2,4,6,8

make sure you are in a vehicle, like MrAuto said, onfoot works only if the player has selected the JOYPAD configuration and I think that not many players did.

Also it depends on the players...
Forum: Scripting Help 05/11/2019, 01:46 PM
Replies: 6
Views: 432
Posted By Nero_3D
Re: AntiCheat system engraved into my server?

if you start your server it should show you how many filterscripts and plugins were loaded
if you disabled everything and it still persists than it is probably a problem in your gamemode

and at...
Forum: Scripting Help 04/11/2019, 02:39 AM
Replies: 6
Views: 1,821
Posted By Nero_3D
Re: error 075: input line too long (after substitutions)

the community compiler disables include guards by default, that will lead to errors if you use incompatible include files

you can reenable the guard by putting #pragma compat 1 in your script...
Forum: Scripting Help 02/11/2019, 06:21 PM
Replies: 19
Views: 1,046
Posted By Nero_3D
Re: This FlashBang effect

pretty similar just DropFlashBang(X, Y, Z); with a offset to x


CMD:flash(playerid, distance[]) {
static bomb = INVALID_OBJECT_ID ;

new Float: X, Float: Y, Float: Z;
...
Forum: Scripting Help 02/11/2019, 03:53 AM
Replies: 19
Views: 1,046
Posted By Nero_3D
Re: This FlashBang effect

yes it does, did you copy all three function and not just replaced DropFlashBang?
Showing results 1 to 25 of 500

 

All times are GMT. The time now is 07:16 PM.


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