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 20/09/2020, 03:17 PM
Replies: 3
Views: 100
Posted By NaS
Re: DeBoostVehicleSpeed vehicle speed

If you multiply the velocity with a negative value, it will change the direction. Furthermore, using a value of 1.5 will speed them up. So in your example they will go backwards faster than they were...
Forum: Scripting Help 17/09/2020, 09:21 PM
Replies: 9
Views: 201
Posted By NaS
Re: DestroyDynamicPickup needs reconnect

Try type 1, it will call OnPlayerPickUp(Dynamic)Pickup but you don't have to do anything there (make sure no other code responds to it, then it's fine).
Forum: Scripting Help 17/09/2020, 02:24 AM
Replies: 9
Views: 201
Posted By NaS
Re: DestroyDynamicPickup needs reconnect

Check which pickup type it is. Some types are a bit buggy and are designed to despawn only in certain conditions, for example when dying or when it explodes, etc. Some of them cannot be destroyed...
Forum: Scripting Help 13/09/2020, 07:25 PM
Replies: 3
Views: 133
Posted By NaS
Re: Help Pickup

Is pHealth multidimensional?

The sizeof in the for loop gets the size of the second dimension, but you only use the first one inside the loop (pHealth[i]). If it only has 1 dimension, use...
Forum: Scripting Help 12/09/2020, 05:31 PM
Replies: 6
Views: 286
Posted By NaS
Re: Fixing transparency of objects?

Use interior 0 and create a black gangzone to cover the minimap.
Forum: Tools and Files 09/09/2020, 04:40 PM
Replies: 2
[Tool/Web/Other] ST Textdraw Editor (Online)
Views: 461
Posted By NaS
Re: ST Textdraw Editor (Online)

Not bad at all, the only problem I see with non-ingame editors is that there are some issues with the GTASA textdraw system that won't be visible here (for example sprites turning non-transparent in...
Forum: Scripting Help 07/09/2020, 05:05 PM
Replies: 3
Views: 157
Posted By NaS
Re: How do i get these buttons (Scripting help)

Sadly you can't, these buttons are hardcoded to the spawn selection (and their text cannot be changed).

The closest you can get is probably using a selectable textdraws and designing something...
Forum: Scripting Help 04/09/2020, 07:41 PM
Replies: 14
Views: 498
Posted By NaS
Re: Bool Opposite

None of the brackets in either version are neccessary...
Forum: Scripting Help 31/08/2020, 03:47 PM
Replies: 1
Views: 106
Posted By NaS
Re: How to make a player moving to position using SetPlayerVelocity() ?

You need to apply slightly positive Z velocity to allow the player to leave the ground, and then also X/Y to make them move in a certain direction.

If you have an angle you want to move the player...
Forum: Scripting Help 28/08/2020, 04:14 PM
Replies: 3
Views: 124
Posted By NaS
Re: How load bool variable?

cache_get_value_int(i - 1, "Locked", _:HouseInfo[i][hLocked]);

Bool is just a tag, you can override it and use the int functions.
Forum: Scripting Help 25/08/2020, 04:41 PM
Replies: 2
Views: 93
Posted By NaS
Re: I need help with the function CreateActor

Actors aren't streamed for different interiors, as soon as you get close on the X/Y axes in the normal world they spawn in (causing them to fall down as the interior isn't loaded yet).

If you use...
Forum: Client Support 25/08/2020, 12:32 PM
Replies: 4
Views: 382
Posted By NaS
Re: Block Alt-Enter

You could trigger the script on release of the alt key, or toggle off BlockInput when alt is released.
Forum: Scripting Help 20/08/2020, 12:48 PM
Replies: 5
Views: 195
Posted By NaS
Re: minor bugs

Could you show the code where you create the textdraws?
I would guess the issue is an incorrect TextSize/alignment.
Forum: Scripting Help 17/08/2020, 02:58 AM
Replies: 13
Views: 313
Posted By NaS
Re: Help My FCNPC

Add the callback FCNPC_OnSpawn(npcid) to your gamemode, and move FCNPC_Spawn and all other FCNPC functions into it (except FCNPC_Create). Similarly you can also add the FCNPC_OnSpawn callback to do...
Forum: Scripting Help 16/08/2020, 07:57 AM
Replies: 5
Views: 657
Posted By NaS
Re: Filterscript not load (OnFilterscriptInit not called) - commands not working

sscanf not being loaded is the reason why the filterscript does not work. sscanf is included and used, but the native does not exist so the filterscript is actually not loaded (even though it says...
Forum: Scripting Help 15/08/2020, 04:05 AM
Replies: 11
Views: 349
Posted By NaS
Re: PawnCMD Flags

if (flags && !(flags & p_Permissions[ playerid ] ) )

Also, if the player has no permissions at all you must check that case as well (by checking if it isn't zero) and act accordingly (ie blocking...
Forum: Scripting Help 11/08/2020, 04:00 AM
Replies: 3
Views: 179
Posted By NaS
Re: HOW is it possible, that this is always = 0?

This is a very common mistake, most of the time it results in incorrect calculations because of loss of precision which can be hard to spot. For example, if you use multiplication and addition, the...
Forum: Scripting Help 04/08/2020, 06:47 PM
Replies: 8
Views: 324
Posted By NaS
Re: Npc driver is lagging

If you are laggy while recording, it will appear in the recording as well.
For the best results, record in an otherwise empty local server.
Forum: Scripting Help 28/07/2020, 03:45 PM
Replies: 7
Views: 226
Posted By NaS
Re: Server lagging OnplayerUpdate

A 10ms timer is literally worse than OPU.
Forum: Scripting Help 23/07/2020, 06:32 PM
Replies: 11
Views: 294
Posted By NaS
Re: Store in a variable when player stop handsup

The newkeys and oldkeys arguments in OnPlayerKeyStateChange are bitmasks that are set for individual keys. They basically contain all states of...
Forum: Scripting Help 23/07/2020, 07:53 AM
Replies: 1
Views: 104
Posted By NaS

That should cover most of your questions.

To send multiple values, seperate them with a &

Forum: Scripting Help 17/07/2020, 03:21 PM
Replies: 6
Views: 249
Posted By NaS
Re: Should I update MySQL plugin to R40 above?

I guess it's just too much work at some point for no visible improvement. It's not like your players will ever notice the difference, so it's not a top priority as long as it still works.
Forum: Scripting Help 16/07/2020, 06:08 PM
Replies: 16
Views: 866
Posted By NaS
Re: Saving&Loading 100 Variables

You are not using the INI_Int and INI_WriteInt functions correctly.

The string you are formatting is the name of the entry in the INI file. However, you include both the index and value in it and...
Forum: Scripting Help 15/07/2020, 11:43 AM
Replies: 3
Views: 215
Posted By NaS
Re: Title[MAX_TITLES][128] in Enum

Multidimensional arrays don't work in multidimensional enumerated arrays. They should theoretically - at least in the community compiler version - but they mostly still don't.

Are all of the...
Forum: Scripting Help 15/07/2020, 11:32 AM
Replies: 6
Views: 304
Posted By NaS
Re: No nametag id only

Please use or [php] tags to show code. It also helps a lot posting the response of the compiler (and marking the error line).

You passed playerid to the "text" argument which is a string.

Showing results 1 to 25 of 500


All times are GMT. The time now is 11:51 AM.

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