General Reference
#1

Links to online resources:

- https://sampwiki.blast.hk/wiki/Main_Page - SA-MP wiki
- https://sampwiki.blast.hk/wiki/Scripting_Basics
- https://sampwiki.blast.hk/wiki/Scripting_Functions
- https://sampwiki.blast.hk/wiki/Scripting_Callbacks
- https://sampwiki.blast.hk/wiki/PAWN_tutorial_1
- https://sampwiki.blast.hk/wiki/PAWN_tutorial_2
- http://wiki.amxmodx.org/index.php/Pawn_Tutorial - This guide is rather hardcoded to AMX Mod X, but still good
- http://pawn.pastebin.com/ - paste code here for debugging
- http://irc://irc.gamesurge.net.com/sa-mp.scripting - official IRC scripting channel
- http://stephantom2.st.funpic.de/experiments/samp/ - unofficial SA-MP PAWN documentation
- http://www.gtamodding.com/index.php?title=Category:PAWN - some basic tutorials and other bits
- http://www.compuphase.com/pawn/pawn.htm - PAWN homepage
- http://www.compuphase.com/pawn/pawn.htm#DOWNLOAD_DOCS - List of library documents
- http://www.compuphase.com/pawn/Pawn_Language_Guide.pdf - pawn-lang.pdf

(Reply if you have anything useful to be added/changed)

Interiors
Look down

GameText Styles
  • 1
    Notes: Fades out automatically after 6 secs. If you have a time setting longer than that, it will re-appear after fading out and repeat until the time ends.
  • 2

    Notes: Doesn't disappear.
  • 3

  • 4

  • 5
Notes: Displays for 3 seconds, regardless of what time you set.
  • 6

GameText Strings
~n~ - New line
~r~ - Red
~g~ - Green
~b~ - Blue
~w~ - White
~y~ - Yellow

Weapons
0 - Unarmed
1 - Brass Knuckles
2 - Golf Club
3 - Night Stick
4 - Knife
5 - Baseball Bat
6 - Shovel
7 - Pool cue
8 - Katana
9 - Chainsaw
10 - Purple Dildo
11 - White Dildo
12 - Long White Dildo
13 - White Dildo 2
14 - Flowers
15 - Cane
16 - Grenades
17 - Tear Gas
18 - Molotovs
22 - Pistol
23 - Silenced Pistol
24 - Desert Eagle
25 - Shotgun
26 - Sawn Off Shotgun
27 - Combat Shotgun
28 - Micro Uzi (Mac 10)
29 - MP5
30 - AK47
31 - M4
32 - Tec9
33 - Rifle
34 - Sniper Rifle
35 - RPG
36 - Missile Launcher
37 - Flame Thrower
38 - Minigun
39 - Sachel Charges
40 - Detonator
41 - Spray Paint
42 - Fire Extinguisher
43 - Camera
44 - Nightvision Goggles
45 - Thermal Goggles
46 - Parachute

(Credit to Opius)

(Edit by spookie):
$GTASA\data\AudioEvents.txt seems to contain a list of sound ids.
Animation Reference: http://www.sa-mp.com/scriptingRC3/SA_AnimList.txt

_________________________________________________

0.2 information topic:

Debug Mode:

When you load debug it goes into single player - this is now correct. Commands still work however F11 and F12 crash currently. There is also a debug script mode:

Topic

Internal Errors:

If you get these reinstall, it means SA:MP has detected mods and is refusing to let you play as mods are not allowed.

Quote:
Originally Posted by aru
Internal Error scenarios are raised when you have Mods.

The number provided is an internal state value, but the cause is the same.

One of your files is modded, this could be one of SA:MP's files or one of your game files.

If you have an internal error, we highly recommend you uninstall GTA:SA, delete the folder, reinstall SA, and then install the 0.2 files.
Connection Messages:

These have been removed as if you don't want them they're annoying and if you do want them they're very easy to add via PAWN.

Animations:

Topic

SetTimerEx, CallRemoteFunction and CallLocalFunction:

These require a special type of format parameter to describe the parameters you are passing. These are the same parameters as are used by sscanf (which is FAR better than strtok for getting parameters from commands).

A full description is available here.

Nightvision/Infrared:

These have never once been mentioned by the dev team, I don't know why so many people think they work because they don't.

Trams:

Trams are not fully natively supported by SA:MP however there is code to assist:

Topic

Text Draw:

A long standing bane of the SCM coding scene, while relatively simple to get working it can take hours of tweaking to get to look right.

Topic

Number Plates:

Basically - set the number plate and respawn the vehicle.

Topic

Gravity:

Default gravity is 0.008 NOT 1.

Tyre Popping:

Readded.

Generic Limits:
  • Players - 500
  • Vehicle Models - Unlimited
  • Vehicles - 2000
  • Pickups - 2048 (dynamic)
  • Objects - 400 (dynamic)
  • Text Draws - 2048 (dynamic)
  • Gang Zones - 1024 (dynamic)
  • Menus - 128 (dynamic)
Compatibility Issues:

Compiler compatibility topic.

OnPlayerDisconnect now has a reason parameter:

public OnPlayerDisconnect(playerid, reason) {}

0 = Timeout
1 = Left
2 = Kicked

SetPlayerSkin is now persistent across respawns.

Weapon Slot Weapons:
  • 0 - 0, 1
  • 1 - 2, 3, 4, 5, 6, 7, 8, 9
  • 2 - 22, 23, 24
  • 3 - 25, 26, 27
  • 4 - 28, 29, 32
  • 5 - 30, 31
  • 6 - 33, 34
  • 7 - 35, 36, 37, 38
  • 8 - 16, 17, 18, 39
  • 9 - 41, 42, 43
  • 10 - 10, 11, 12, 13, 14, 15
  • 11 - 44, 45, 46
  • 12 - 40
Other:

This is basically a cross between an FAQ and General Reference, any other information you feel is relevant please post.
Reply


Messages In This Thread
General Reference - by Mike - 26.01.2006, 19:03
General Reference - by Simon - 04.04.2006, 10:32
General Reference - by RayW - 04.04.2006, 10:48
General Reference - by Postality - 04.04.2006, 19:42
General Reference - by Mount - 05.04.2006, 14:34
car colors - by Denver - 06.04.2006, 21:31
Sound IDs - by webspy - 10.04.2006, 18:20
General Reference - by ARMax - 10.04.2006, 18:46
General Reference - by jbeta - 11.04.2006, 01:17
General Reference - by Postality - 12.04.2006, 13:35
General Reference - by Postality - 13.04.2006, 06:10
General Reference - by jbeta - 15.04.2006, 00:01
General Reference - by Arctos - 17.04.2006, 10:39
Re: General Reference - by Denver - 24.04.2006, 06:44
Re: General Reference - by PsYcHoGoD - 15.05.2006, 15:32
Re: General Reference - by JernejL - 19.05.2006, 15:55
Re: General Reference - by Allan - 29.05.2006, 15:42
Re: General Reference - by Manej - 31.05.2006, 00:15
Re: General Reference - by Allan - 31.05.2006, 01:02
Re: General Reference - by Allan - 06.06.2006, 21:10
Re: General Reference - by SidViciousII - 16.06.2006, 20:13
Re: General Reference - by RayW - 16.06.2006, 22:22
Re: General Reference - by DracoBlue - 17.06.2006, 09:26
Re: General Reference - by Allan - 17.06.2006, 10:11
Game Object ID's - by Spectre - 18.06.2006, 02:15
Re: General Reference - by Allan - 18.06.2006, 09:36
Re: General Reference - by Drakos - 18.06.2006, 11:06
Re: General Reference - by Allan - 18.06.2006, 11:38
Re: 0.2 coding information. - by Hell_Demon - 07.06.2007, 17:53
Re: 0.2 coding information. - by 50p - 08.06.2007, 17:54
Re: 0.2 coding information. - by weedarr - 09.06.2007, 09:10
Re: General Reference - by Betamaster - 10.06.2007, 22:36
Re: 0.2 coding information. - by vick - 11.06.2007, 07:13
Re: General Reference - by boylett - 16.06.2007, 19:04
Ped IDs - by Ottae - 18.06.2007, 14:19
Re: General Reference - by DracoBlue - 21.06.2007, 10:26
Re: General Reference - by supness420 - 26.06.2007, 02:02
Re: General Reference - by supness420 - 26.06.2007, 02:43
Re: General Reference - by hansen111 - 14.01.2008, 18:21
Re: General Reference - by BeckzyBoi - 14.01.2008, 19:09
Re: General Reference - by hansen111 - 17.01.2008, 11:34
Re: General Reference - by MaXx001 - 23.01.2008, 06:13
Re: General Reference - by BeckzyBoi - 28.01.2008, 19:54
Re: General Reference - by yom - 28.01.2008, 20:14
Re: General Reference - by yom - 17.02.2008, 05:18
Re: General Reference - by Simon - 18.02.2008, 05:35
Re: General Reference - by sparker_rus - 27.02.2008, 13:07
Re: General Reference - by ConTron - 28.02.2008, 17:25
Re: General Reference - by Hiitch - 24.12.2009, 12:47
Re: General Reference - by Backwardsman97 - 24.12.2009, 17:08
Re: General Reference - by jamesbond007 - 28.03.2010, 15:28
Re: General Reference - by Masj - 07.04.2010, 20:42
Re: General Reference - by Zamaroht - 27.05.2010, 22:43
Re: General Reference - by Hiddos - 07.07.2010, 16:43
Re: General Reference - by legodude - 13.07.2010, 19:21
Re: General Reference - by Lucy - 20.07.2010, 12:38
Re: General Reference - by FireCat - 16.08.2010, 13:32
Re: General Reference - by OKStyle - 06.09.2010, 04:25
Re: General Reference - by willsuckformoney - 03.10.2010, 20:05
Respuesta: Re: General Reference - by MrDeath537 - 01.12.2010, 20:15
Re: General Reference - by Miralem - 12.01.2011, 19:45
Re: General Reference - by xalyy - 26.01.2011, 12:35
Re: General Reference - by [03]Garsino - 01.02.2011, 06:35
Re: General Reference - by Superthijs - 09.08.2011, 16:59
Re: General Reference - by [03]Garsino - 14.08.2011, 19:46
Re: General Reference - by sleepysnowflake - 14.08.2011, 19:47
Re: General Reference - by Blantas - 18.09.2011, 18:20
Re: General Reference - by [03]Garsino - 18.09.2011, 21:13
Re: General Reference - by Kimori - 01.10.2011, 17:13
Re: General Reference - by Austin - 09.10.2011, 00:35
Re: General Reference - by Kimori - 09.10.2011, 06:50
Re: General Reference - by Kyle - 09.10.2011, 07:34
Re: General Reference - by Blantas - 05.04.2012, 08:29
Re: General Reference - by Hiddos - 29.04.2012, 16:15
Re: General Reference - by iggy1 - 06.07.2012, 10:21
Re: General Reference - by Stylock - 06.07.2012, 14:16
Re: General Reference - by iggy1 - 06.07.2012, 14:25
Re: General Reference - by Stylock - 06.07.2012, 15:54
Re: General Reference - by iggy1 - 06.07.2012, 16:46
Re: General Reference - by JoBullet - 07.07.2012, 00:03
Re: General Reference - by Kar - 07.07.2012, 17:58
Re: General Reference - by detter - 21.08.2012, 00:30
Re: General Reference - by Virus. - 28.10.2012, 11:19
Re: General Reference - by Lordzy - 28.10.2012, 11:30
Re: General Reference - by Virus. - 28.10.2012, 11:37
Re: General Reference - by Y_Less - 28.10.2012, 12:05
Re: General Reference - by [KHK]Khalid - 09.11.2012, 18:28
Re: General Reference - by Virus. - 19.11.2012, 08:22
Re: General Reference - by Y_Less - 19.11.2012, 09:35
Re: General Reference - by Schocc - 17.12.2012, 12:19
Re: General Reference - by SilverKiller - 03.02.2013, 14:00
Re: General Reference - by mastermax7777 - 11.02.2013, 04:35
Re: General Reference - by Austin - 04.04.2013, 11:19
Re: General Reference - by LarzI - 04.04.2013, 13:03
Re: COMANDO COM LIMITE DE DISTГNCIA - by Smoking_Script - 18.07.2013, 13:07
Re: General Reference - by Guest4390857394857 - 30.04.2014, 17:36
Re: General Reference - by MarvinPWN - 01.09.2015, 09:56
Re: General Reference - by Yashas - 17.10.2015, 15:03
Re: General Reference - by GangstaSunny - 05.02.2016, 06:24
Re: General Reference - by Crayder - 10.02.2016, 11:36
Re: General Reference - by AndreiWow - 15.04.2017, 20:05

Forum Jump:


Users browsing this thread: 5 Guest(s)