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: NaS
Forum: Scripting Help 17/08/2018, 05:07 PM
Replies: 2
Views: 44
Posted By NaS
Re: Keep current weapon ammo even when swapped?

Did you have only 20 ammo in the magazine (and only that mag) or still ammo left in total?

So if you have 150 ammo in total it shows 100-50. If you shoot 20 and switch forth and back it will show...
Forum: Scripting Help 17/08/2018, 04:51 PM
Replies: 3
Views: 51
Posted By NaS
Re: Attach dynamic object or player object to vehicle

Next time take a look into a_samp.inc (or the related include, in this case a_objects.inc) and streamer.inc. :) All the natives are there (use the search in your editor to find what you need).
Forum: Scripting Help 17/08/2018, 02:55 PM
Replies: 3
Views: 51
Posted By NaS
Re: Attach dynamic object or player object to vehicle

AttachDynamicObjectToVehicle and AttachPlayerObjectToVehicle (http://wiki.sa-mp.com/wiki/AttachPlayerObjectToVehicle)

You need to create an object beforehand (dynamic or player object) and then...
Forum: Everything and Nothing 16/08/2018, 08:20 PM
Replies: 33
Views: 1,736
Posted By NaS
Re: Cheat folders and files?

There are multiple methods to hook foreign DLLs or actually any file.

- Mapping DLLs using WinHooks or other more advanced programs
- Modifying your DLL to also load mine
- Modify your code to...
Forum: Everything and Nothing 16/08/2018, 07:28 PM
Replies: 33
Views: 1,736
Posted By NaS
Re: Cheat folders and files?

The filename is completely irrelevant. I can name a file anything I want and it still runs as intended if you start it like intended.

Same for executables. I can name any program explorer.exe,...
Forum: Everything and Nothing 16/08/2018, 04:04 PM
Replies: 33
Views: 1,736
Posted By NaS
Re: Cheat folders and files?

That helps against noobs, but anyone that knows what they are doing can circumvent all of this (either by simple renaming, which you didn't catch so far, or by injecting externally - eg. d3d9.dll...
Forum: Scripting Help 12/08/2018, 12:46 PM
Replies: 14
Views: 259
Posted By NaS
Re: Wait on OnPlayerConnect

No it doesn't. It doesn't even have to be forwarded at all for it to work; it only forces a reparse if you don't forward them.


OT:

I understood it so that the message and dialog etc pop up...
Forum: Scripting Help 11/08/2018, 05:35 PM
Replies: 7
Views: 132
Posted By NaS
Re: Which is the better method?

One of my old scripts uses about 30k areas (of all sizes and forms), and it's working perfectly fine. The way the Streamer Plugin processes them is WAY more efficient than you can achieve with PAWN...
Forum: Scripting Help 11/08/2018, 05:06 PM
Replies: 3
Views: 75
Posted By NaS
Re: Code doesn't work.

Looks like vehicleid[0] or vehicleid[1] have the value 0, since you subtract 400 from it and it accesses index -400 which is invalid:

strcat(VehicleText, VehicleNames[vehicleid[0] -400]);

You...
Forum: Scripting Help 11/08/2018, 03:11 AM
Replies: 4
Views: 98
Posted By NaS
Re: Help

You call mysqli_fetch_array only once. However, you need to call it for every row (each call gets the next row). Place it inside the while loop.
Forum: Scripting Help 10/08/2018, 06:08 PM
Replies: 14
Views: 226
Posted By NaS
Re: Textdraw question

The "~" should be "~n~". Furthermore i will never reach the size of the array. Its max. value will be sizeof(JobNames) - 1.
Forum: Screenshots and Videos 08/08/2018, 04:53 AM
Replies: 7
Views: 488
Posted By NaS
Re: Los Santos Bay Bridge

Well looks a bit out of place but gets the job done. Could use some improvements, maybe use the highway objects around LSIA, at least for the most part as they are flat and straight, so you can align...
Forum: Scripting Help 07/08/2018, 11:35 PM
Replies: 2
Views: 117
Posted By NaS
Re: Help: Ackslimit 50000 "lot lag"

Might be RNPC. Very frequent update rates or extremely long paths (eg goto from one side of the map to the other) can produce this.
Forum: Scripting Help 07/08/2018, 03:28 PM
Replies: 3
Views: 86
Posted By NaS
Re: Loop .ini files

Why? Even if it takes 10 minutes to execute (which it won't), what's the problem? It's solvable in a few minutes with a few lines of code.
Forum: Scripting Help 07/08/2018, 02:39 PM
Replies: 3
Views: 86
Posted By NaS
Re: Loop .ini files

http://forum.sa-mp.com/showthread.php?t=653119

You only need to have this plugin for the purpose of getting a list of all files.

Use OpenDir on the User directory, and then use DirNext in a...
Forum: Scripting Help 07/08/2018, 02:22 PM
Replies: 2
Views: 65
Posted By NaS
Re: [HELP] Use punches as weapons and kill does not die.

Explain better, and try it for yourself. If you have code that does not work, share it with us and we can tell you how to make it work.
Forum: Scripting Help 07/08/2018, 02:13 PM
Replies: 11
Views: 227
Posted By NaS
Re: Pulling a date from MySQL DB

http://forum.sa-mp.com/showthread.php?t=627520

Look at this for an example (different purpose but everything you need to know is in there). It uses a threaded query, which means the query will be...
Forum: Scripting Help 07/08/2018, 12:32 PM
Replies: 11
Views: 227
Posted By NaS
Re: Pulling a date from MySQL DB

You can do

SELECT CONVERT(varchar, REGDATE, 1) FROM ... WHERE ...

where varchar is the target datatype (string), REGDATE is the date you want to convert (the column from your table) and 1 is...
Forum: Scripting Help 02/08/2018, 01:41 PM
Replies: 3
Views: 91
Posted By NaS
Re: Need Help on Sockets.

Are the SAMP Server and the web server on the same host?

If not, you probably open a listen socket on the SAMP Server and connect to it from PHP, then you need to fill in the SAMP Server's public...
Forum: Scripting Help 01/08/2018, 06:36 PM
Replies: 2
Views: 76
Posted By NaS
Re: Any ideas? controls

Good idea, but it doesn't work that easily.

The line will compile to something like this:

if(GetVehicleModel(vehicle) == 417 || 425 || 447 || 469 ...

Which is incorrect.

It should be...
Forum: Scripting Help 01/08/2018, 06:07 PM
Replies: 2
Views: 58
Posted By NaS
Re: Tag mismatch and number of arguments does not match definition

carHealth and carFuel do not exist in that function. For fuel you need to add a custom Fuel system, for health you can set the car's health when creating it:
...
Forum: Scripting Help 01/08/2018, 01:36 PM
Replies: 2
Views: 65
Posted By NaS
Re: moveobject / mapping error

For the rotation to work the object also needs to be moved, unfortunately.

So, if you want to rotate an object for 1 second, you need to move it by (for example) 0.1 meters at a speed of 0.1 m/s....
Forum: Scripting Help 01/08/2018, 09:30 AM
Replies: 1
Views: 67
Posted By NaS
Re: Error 055 in my prison_system pawno

forward LoadStreamerDynamicObjects();

should be

LoadStreamerDynamicObjects()

forward is only used to forward public functions. This function does not need to be public thus not forwarded....
Forum: Scripting Help 01/08/2018, 06:52 AM
Replies: 3
Views: 106
Posted By NaS
Re: [OFFTOPIC] 0.3.7 or 0.3.DL

If you need the new functions (custom models) you may want to use 0.3DL.

But if not, there is no good reason to use 0.3DL since there are simply a lot more players using 0.3.7.
Plus 0.3DL has...
Forum: Scripting Help 30/07/2018, 05:55 PM
Replies: 6
Views: 108
Posted By NaS
Re: Random team spawns!

It won't, the second dimension is 4 indexes (x, y, z, a). Furthermore, you don't really need to specify the size before declaring an array with initialization data. PAWN automatically determines the...
Showing results 1 to 25 of 500

 

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


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