Hello There, Guest! Login or Register


Scripting Reference
#2
From Boyeltt in the other unoffical forums:

Links to online resources:

Old forums: http://web.archive.org/web/2007082623194.../index.php
http://wiki.sa-mp.com/wiki/Main_Page - SA-MP wiki
- http://wiki.sa-mp.com/wiki/Scripting_Basics
- http://wiki.sa-mp.com/wiki/Scripting_Functions
- http://wiki.sa-mp.com/wiki/Scripting_Callbacks
- http://wiki.sa-mp.com/wiki/PAWN_tutorial_1
- http://wiki.sa-mp.com/wiki/PAWN_tutorial_2
http://f3llah1n.eyebro.ws/sa-mp/newbie-s...indows.txt - A brilliant guide to setting up and running your own server.
http://sa-mp.no-ip.org/ - hosting for you game modes (remember to include the .pwn)
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
irc://irc.gtanet.com/sa-mp.scripting - official IRC 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.xendot.com/games/grandtheftau...es/all.php - List of all vehicles
http://virtualscripting.net/forum/viewforum.php?f=20 - External scripting site with many tutorials.

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

GameText Styles
    * 0 - Fades in and out.
    * 1 - 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 - Doesn't disappear.
    * 3
    * 4
    * 5 - 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
~l~ - Black
~h~ - Lighter
~p~ - Purple
] - Creates a * in some texts instead of a ]
~u~ - Creates an up arrow
~d~ - Create a down arrow
~<~ - Creates a left arrow
~>~ - Creates a right arrow

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

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.

Generic Limits:
    * Players - 200
    * Vehicle Models - 70
    * Vehicles - 700
    * Pickups - 100 (dynamic)
    * Objects - 150 (250 possible but unstable) (dynamic)
    * Text Draws - 96 (dynamic)
    * Gang Zones - 1024 (dynamic)
    * Menus - 128 (dynamic)

OnPlayerDisconnect reasons
0 = Timeout
1 = Left
2 = Kicked

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
Reply


Messages In This Thread
Scripting Reference - by Montana - 04-21-2008, 03:03 PM
Re: Scripting Reference - by Jay - 04-21-2008, 03:20 PM
Re: Scripting Reference - by Smoke - 04-24-2008, 01:12 PM