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: NaS
Forum: Scripting Help 07/12/2019, 02:15 PM
Replies: 4
Views: 89
Posted By NaS
Re: Question about function

Exactly, one of them will be executed before the other and once the first has finished completely, it will execute the other without any issues. Otherwise you would have huge problems with the amount...
Forum: Scripting Help 07/12/2019, 01:16 PM
Replies: 4
Views: 89
Posted By NaS
Re: Question about function

Pawn is running in a single thread (at least in SAMP), which means two functions can never run at the same time. It will only ever execute one instruction after the other.
Forum: Scripting Help 28/11/2019, 05:03 PM
Replies: 3
Views: 146
Posted By NaS
Re: SAFull.hmap + My Map

I would suggest looking into ColAndreas. It lets you add your custom maps to the collision world without building/creating a file everytime it changes, you can even change maps live on the server and...
Forum: Scripting Help 22/11/2019, 05:43 PM
Replies: 5
Views: 175
Posted By NaS
Re: HTTP and utf-8 encoding

You need to use Windows-1252 if you want the SAMP server to read it correctly. This also means switching the charset in the header AND editor, otherwise it will show incorrectly in browsers.
...
Forum: Scripting Help 19/11/2019, 04:21 PM
Replies: 1
Views: 143
Posted By NaS
Re: question about limits

No, the limit is independant from the amount of scripts. There are 100 Map Icon IDs for all scripts (per player).
If you use no streamer, the second script will most likely replace the MapIcons of...
Forum: Scripting Help 01/11/2019, 04:51 PM
Replies: 9
Views: 279
Posted By NaS
Re: Bike up arrow spam

That's not how the glitch works, KEY_UP and KEY_DOWN are the directional keys (W and S, used for acceleration and brakes). Those are not the buttons you do the glitch with, you need to check for...
Forum: Scripting Help 30/10/2019, 07:19 PM
Replies: 10
Views: 359
Posted By NaS
Re: FCNPC Crashing server.

Move all the FCNPC functions that come after FCNPC_Create to the callback FCNPC_OnCreate.

Make sure the npcid in that callback is actually the NPC you just created by checking if it is equal to...
Forum: Scripting Help 30/10/2019, 07:07 PM
Replies: 4
Views: 155
Posted By NaS
Re: Is it possible to zoom in on the textdraw sprite?

You need to use TextDrawTextSize to change the size (which op already did). Also that is not zooming, it's simply changing the total size. You cannot zoom in on sprites.

Depending on what you want...
Forum: Scripting Help 21/10/2019, 07:04 PM
Replies: 6
Views: 238
Posted By NaS
Re: mapandreas.

Because mapandreas returns the surface height but objects have their origins not neccessarily in the perfect spot, so you need to find a good Z offset for each model.
Actually on slopes etc you need...
Forum: Scripting Help 01/10/2019, 11:31 PM
Replies: 13
Views: 329
Posted By NaS
Re: Rounding a number

You're dividing an integer by another integer (I'm assuming pTokens is an integer). Divide it by 5.0 instead of 5 to do a floating point operation inside floatround, otherwise 27 / 5 will result in 5...
Forum: Scripting Help 01/10/2019, 11:27 PM
Replies: 2
Views: 115
Posted By NaS
Re: A question about dynamic actors.

That's useless for what OP was asking. The server doesn't know about any possible position changes if it happens on client-side (since actors sometimes fall through the ground and despawn elsewhere)....
Forum: Scripting Help 19/09/2019, 05:45 PM
Replies: 2
Views: 133
Posted By NaS
Re: Making the "carry" animation stay while the player walks, jumps and whatnot.

You can apply the carry special action using SetPlayerSpecialAction:

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

(See at the very bottom, ID 25)

This will keep the animation while walking and...
Forum: Everything and Nothing 09/09/2019, 04:49 PM
Replies: 5
Views: 343
Posted By NaS
Re: Sublime Text 3

What encoding are you using? You can switch encoding in the lower right corner of Sublime, reopen the file with encoding Windows 1252 or UTF8 (make a backup first in case there are incompatible...
Forum: Scripting Help 09/09/2019, 04:46 PM
Replies: 1
Views: 91
Posted By NaS
Re: GetObjectPos Attach Vehicle

You need to recalculate the position relative to the vehicle. I'd suggest using Nero_3D's rotations.inc (link (https://forum.sa-mp.com/showthread.php?t=614857)).
...
Forum: Scripting Help 17/08/2019, 12:40 PM
Replies: 4
Views: 111
Posted By NaS
Re: Problem AUTO_INCREMENT

The ID is not an index like in an array, so just an artificial number and it doesn't really matter how big the number is.
This is also useful if you reference the ID somewhere else, if the character...
Forum: Scripting Help 13/08/2019, 02:36 PM
Replies: 6
Views: 196
Posted By NaS
Re: numhash'd usernames

There can always be collisions but that depends on the algorithm. What's the point anyway?

If that number is larger than a 4 byte variable can store, dividing is pointless. It would already have...
Forum: Scripting Help 13/08/2019, 11:41 AM
Replies: 2
Views: 121
Posted By NaS
Re: auto capital letter chat

Much simpler:

text[0] = toupper(text[0]);

And even if you wanted to code that manually, you can just do this:

if(text[0] >= 'a' && text[0] <= 'z') text[0] -= 32;

But I think that's not...
Forum: Scripting Help 05/08/2019, 04:50 PM
Replies: 2
Views: 85
Posted By NaS
Re: Server returns random numbers instead of the ones I set

SAZONE_CODE is an array (size 3) but you assign an integer value to it (516). This will actually only set the first index of the array to 516, so its content will be {516, 0, 0}.

In your...
Forum: Scripting Help 18/07/2019, 06:10 PM
Replies: 3
Views: 195
Posted By NaS
Re: Streamer: Invalid Data Specified

E_STREAMER_MOVE_X

This is only used for moving objects, you probably intended to use E_STREAMER_X.
Forum: General 17/07/2019, 06:37 PM
Replies: 11
Views: 1,330
Posted By NaS
Re: Climbing ladders.

The parachute animation (when the chute is open) and you lean back is not too bad. But I'm not sure if that animation can be frozen in the right frame.
Forum: Scripting Help 13/07/2019, 02:37 PM
Replies: 2
Views: 149
Posted By NaS
Re: Dynamic Area Not Work

Dynamic areas aren't instantly processed when created, so at the time of creation noone will actually be inside.

You can use the recheck parameter of IsPlayerInDynamicArea (set it to 1) to force a...
Forum: Screenshots and Videos 11/07/2019, 03:25 PM
Replies: 11
Views: 1,108
Posted By NaS
Re: Deleted Bayside and San Fierro Bridge

You packed a link, not the actual file.
Not that anyone would need it, you can just remove all objects in a certain radius anyway.
Forum: Scripting Help 03/07/2019, 03:13 PM
Replies: 3
Views: 119
Posted By NaS
Re: Problem tag

It must be != -1, strfind returns -1 if the text was not found and the position (0 or greater) if it was found.

If you want to specifically check if the tag is at the start of the name, you can...
Forum: Scripting Help 02/07/2019, 04:13 PM
Replies: 9
Views: 394
Posted By NaS
Re: Map on TD

What's the purpose of all? You add maxx and maxy together and assign that to all, but that doesn't really make sense.

If you want to limit the world to a certain area you still need to use 3000.0...
Forum: Scripting Help 01/07/2019, 07:19 PM
Replies: 9
Views: 394
Posted By NaS
Re: Map on TD

You'll need to scale the player positions to the TD map grid. There are a few differences though:

- The Sprite/TD origin is in the top left corner, x goes from left to right and y from top to...
Showing results 1 to 25 of 500

 

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


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