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 17/08/2019, 11:40 AM
Replies: 4
Views: 76
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, 01:36 PM
Replies: 6
Views: 152
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, 10:41 AM
Replies: 2
Views: 79
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, 03:50 PM
Replies: 2
Views: 64
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, 05:10 PM
Replies: 3
Views: 169
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, 05:37 PM
Replies: 11
Views: 900
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, 01:37 PM
Replies: 2
Views: 107
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, 02:25 PM
Replies: 11
Views: 858
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, 02:13 PM
Replies: 3
Views: 103
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, 03:13 PM
Replies: 9
Views: 360
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, 06:19 PM
Replies: 9
Views: 360
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...
Forum: Filterscripts 29/06/2019, 01:46 PM
Replies: 212
Views: 52,299
Posted By NaS
Re: NPC Drivers - Citizen & Fully working Taxi script - (FS-Version)

I updated the links to the correct plugins. For rotations.inc you need to use the 1.2.0 version for now.

I'm not really interested in continuing this as long as the velocity bug isn't fixed, so...
Forum: General 26/06/2019, 05:59 PM
Replies: 5
Views: 424
Posted By NaS
Re: Lying policeman ID

That's a speed bump and a hangar. Close enough.

There's a tied cop, ID: 3092
Forum: Scripting Help 24/06/2019, 02:19 PM
Replies: 3
Views: 145
Posted By NaS
Re: Custom map on minimap

Yea that's the best solution if you don't want to use client side mods.

If the map is big you could also split the whole TD into smaller squares, and show 9 of them at the same time, so you could...
Forum: Scripting Help 23/06/2019, 03:19 PM
Replies: 3
Views: 145
Posted By NaS
Re: Custom map on minimap

Not really. You could use a TextDraw on 0.3dl and show another TD (eg a Marker) at the player's current position on it, but not for the actual radar. That's only possible with client side mods.
...
Forum: Scripting Help 22/06/2019, 06:17 PM
Replies: 2
Views: 89
Posted By NaS
Re: Create hmap (height-map)

I could generate one for you, but it would be way easier if you look into ColAndreas. CA has full 3D collision, but also the 2D Height Map can be used by raycasting from the sky (so you wouldn't even...
Forum: Scripting Help 21/06/2019, 05:06 PM
Replies: 3
Views: 117
Posted By NaS
Re: None has fixed Dialog Problem yet ?

Even if you wouldn't be able to change dialog IDs (which is always possible, but let's say it's not) you could write a super simple include that hooks ShowPlayerDialog and uses a variable to...
Forum: Scripting Help 21/06/2019, 03:55 PM
Replies: 2
Views: 72
Posted By NaS
Re: AllowPlayerTeleport() : function is deprecated.

AllowPlayerTeleport has nothing to do with the server restarting issue. It's only a reminder that this function isn't working anymore, but it doesn't break anything if you use it.

Use crashdetect...
Forum: Tools and Files 13/06/2019, 02:13 PM
Replies: 5
[Tool/Web/Other] bAnticheat [C# Client]
Views: 761
Posted By NaS
Re: bAnticheat [C# Client]

There should be a way to know which processes/files are looked for (for the player) before actually joining.
For example, when the scheme is downloaded and illegal files/processes are found already,...
Forum: Scripting Help 13/06/2019, 11:35 AM
Replies: 4
Views: 201
Posted By NaS
Re: Attached actor label?

The fact that you need to move for it to appear is related to the streamer, and ONLY streamer labels, and idle updating can be turned on by using Streamer_ToggleIdleUpdate. You can use it for any...
Forum: Scripting Help 12/06/2019, 02:56 PM
Replies: 3
Views: 181
Posted By NaS
Re: How to do this?

That would work, although there might be a faster/more efficient way if you can retrieve the array index from the 3D menu (not sure on that one since I never used those myself), I think there should...
Forum: Scripting Help 11/06/2019, 06:22 PM
Replies: 5
Views: 157
Posted By NaS
Re: help me dialog problem

You could replace them back to actual escape characters after loading them. Or escape your string properly before saving it.
Forum: Scripting Help 11/06/2019, 05:56 PM
Replies: 11
Views: 444
Posted By NaS
Re: Maps issue

How do you include them?
And do you have multiple files with the same?

Does the hook get called even? Use a print or so to check.
Forum: Scripting Help 11/06/2019, 05:52 PM
Replies: 9
Views: 322
Posted By NaS
Re: Detect when player leaves train

When leaving a train (or any vehicle) it will always call OnPlayerStateChange. It will either change from Driver to On Foot, or from Passenger to On Foot. So depending on if the player is the driver...
Forum: Scripting Help 09/06/2019, 04:45 PM
Replies: 1
Views: 96
Posted By NaS
Re: interpolate colors

Do you mean for example from 0xFF0000FF (red) to 0xFFFF00FF (yellow) in a certain amount of steps?


stock GetRGBAComponents(color, &r, &g, &b, &a)
{
r = ((color>>24)&255);
g =...
Showing results 1 to 25 of 500

 

All times are GMT. The time now is 06:26 AM.


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