Forum: Scripting Help
07/12/2019, 02:15 PM
|
Replies: 4
Views: 89
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
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
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
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
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
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
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
|
Forum: Scripting Help
21/10/2019, 07:04 PM
|
Replies: 6
Views: 238
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
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
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
|
Forum: Everything and Nothing
09/09/2019, 04:49 PM
|
Replies: 5
Views: 343
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
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
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
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
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
|
Forum: Scripting Help
18/07/2019, 06:10 PM
|
Replies: 3
Views: 195
|
Forum: General
17/07/2019, 06:37 PM
|
Replies: 11
Views: 1,330
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
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
|
Forum: Scripting Help
03/07/2019, 03:13 PM
|
Replies: 3
Views: 119
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
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
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...
|