SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Closed Thread
Thread Tools Display Modes
Old 12/09/2011, 04:57 PM   #1
SA-MP Developer
Join Date: Apr 2005
Posts: 1,180
Reputation: 2891
Default SA-MP 0.3d RC client/server (now released)

SA-MP 0.3d RC

Note: SA-MP 0.3d is now released. This thread will be archived.

Optional client update SA-MP 0.3d RC9-3

Unfortunately, the game pausing at the menu changes made earlier will have to be reverted. At this stage it appears to be causing too many new problems and crashes. Hopefully this feature can be tested further and added to a future SA-MP update. This also reverts changes made to TogglePlayerControllable.

- Added "directmode" sa-mp.cfg variable for players that have problems with chat text rendering.
- Fixed issue with the client not returning to class selection after a gamemode restart.
- Fixes a client crash related to DestroyObject.
- Fixes a client crash related to trailers detaching.

Optional client update SA-MP 0.3d RC9-2

- Should fix problem with vehicles instantly stopping at the pause menu.
- In some situations it was still possible to have overlapping audio streams.
- Fixed problems with dialogs displaying during alt-tab and pause.
- Should resolve remaining issues with motorbike/pushbike spawning above the ground.
- Readded cPos/sPos to /dl.
- Should resolve issue with snow object texture introduced in RC9.

Client/Server update SA-MP 0.3d RC9

- Added OnPlayerClickMap pawn callback.
- Disabled AllowAdminTeleport and AllowPlayerTeleport.
- You can use the GTA ~k~ constants in client messages and 3d text labels.
- Fixed issue with LOS parameter in player 3D text labels.
- Fixed potential client crash if a player enters an invalid passenger seat.
- Fixed issue with motorbikes/pushbikes spawning above the ground.
- Fixed server crash on windows server if you entered a blank command in the console.

pawn Code:
forward OnPlayerClickMap(playerid, Float:fX, Float:fY, Float:fZ);

OnPlayerClickMap is called when a player right clicks on the GTA:SA map menu. The position returned is the X,Y positon they clicked and an estimated ground postion. Please note: Since players do not know the ground position for the entire GTA:SA map, the Z value provided is only an estimate. You may need to use a plugin like the MapAndreas plugin to get a more accurate ground Z position.

Client/Server update SA-MP 0.3d RC8

- 'multicore' option is now enabled by default.
- Removed unused textures from the samp.img.
- Fixes game exit crash related to the object limit increase.
- Fix for TogglePlayerControllable when the player is at the menu.
- Fix for traffic lights desyncing.
- Updated credits screen.
- Updated NSIS installer version (fixes problems with UAC on Windows 7).

Client/Server update SA-MP 0.3d RC7

- Should fix chat rendering issues on notebooks with VIA/S3 graphics.
- Added IsObjectMoving/IsPlayerObjectMoving pawn natives.
- Corrects problem with using SetVehicleParamsEx in OnVehicleSpawn.
- Fixed vanishing pickups in interiors.
- Added GetPlayerTargetPlayer() pawn native, which gets the players current target player (think green arrow thing).
- Fixed crash if you paused in debug/test mode.
- You can now use the 'Test' mode of Jernej's map editor to spawn inside interiors (as long as you have the interior object selected).
- Added latest objects from cessil:
* A replacement mesh for the Verona mall which contains enterable shop areas which you can add objects to. Please see the ls_mall.pwn FS for an example.
* A hot air balloon object with several colour variations.
* Fireman hats.

pawn Code:
native GetPlayerTargetPlayer(playerid);

Get the player that the player is trying to target with aim [right click] button. Returns INVALID_PLAYER_ID if there is no target player.

Optional client update SA-MP 0.3d RC6-2

- Should fix most problems related to pausing at the menu which were introduced in 0.3d RC6.
- More tweaks to the siren enabling since some people reported it was still hard to enable.

Client/Server update SA-MP 0.3d RC6

- Added KEY_YES (Y), KEY_NO (N), KEY_CTRL_BACK (H) game keys for GetPlayerKeys().
- TextDrawSetString() can be used to change the sprite texture of an existing TextDraw.
- Fixed problem where attached objects might keep moving after StopObject is called.
- Fixed problem some players experience trying to enable the vehicle siren.
- The game will not pause when you enter the menu.
- The game will not go to the menu when you return from alt-tab.

Optional client update SA-MP 0.3d RC5-3

- You can now use SA-MP's TextDraw system with a special font ID to draw on-screen sprites from the single-player missions.

pawn Code:
if(strcmp(cmd, "/tdsprite",true) == 0) {
    new Text:txtSprite1;
    txtSprite1 = TextDrawCreate(200.0, 220.0, "samaps:map"); // Text is txdfile:texture
    TextDrawFont(txtSprite1, 4); // Font ID 4 is the sprite draw font
    TextDrawTextSize(txtSprite1,200.0,200.0); // Text size is the Width:Height
    return 1;

By setting the font ID to 4 and the text to txdfile:texture you can draw a single on-screen sprite. Possible values for txdfile are:
- hud: Textures from the game's hud.txd
- samaps: San Andreas map textures included with SA-MP in the samaps.txd file in the SAMP folder.
- Any txd file and texture found in the models\txd folder in your GTA San Andreas directory.

Example of things that can be drawn with on-screen sprites:

Optional client update SA-MP 0.3d RC5-2

- The surfing logic now works on objects attached to vehicles.
- Changes to the way clients deal with moving objects:

The behaviour of MoveObject will have to be changed from previous SA-MP versions, as the position can become desynced - especially when a player pauses. If you want to use MoveObject on an object that is already moving, and you want it to start moving from its current position, you must first call StopObject. If you don't use StopObject first, the last MoveObject will finish instantly and the object will begin moving from the last MoveObject position.

Client/Server update SA-MP 0.3d RC5

- Added OnPlayerGiveDamage callback. This is the opposite of OnPlayerTakeDamage. It is sent by a player who is damaging another player.
- More tweaks to the weapon strafing game speed.
- Fix for SetPlayerTeam() sometimes desyncing and allowing friendly fire.
- Players found a way to avoid colour codes being stripped from the chat text. This has been resolved in 0.3d.
- Added the missing player skins. Thanks to IllidanS4 for providing the IDs and the voice file names.

pawn Code:
forward OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid);

Optional client update SA-MP 0.3d RC4-2

- Some users were experiencing a start-up crash related to Securom.

Client/Server update SA-MP 0.3d RC4

- The player slots on the server is uncapped (up to 500 slots).
- MoveObject will not interfere with rotation if the rotation parameters aren't used. It will also not interfere with SetObjectRot().
- Fixed 2-sided texture problem on the Area 51 fence.

Optional client update SA-MP 0.3d RC3-3

- This update should correct problems some people noticed with slightly increased game speed.
- Added sa-mp.cfg option 'multicore'. If you set multicore=1 in the sa-mp.cfg, GTA:SA will use multiple CPU cores when running SA-MP. Eventually this option will be enabled by default, once it has been through some testing.
- Added all latest models and edits from cessil to the samp.ide/samp.img.
- Removed the BigCesar model from the samp.ide because it appears to be causing hangs.

Important: For servers that use SPECIAL_ACTION_USECELLPHONE. This special action will no longer display the cellphone model in the player's hand. This has been done so that other objects can be used in place of the cellphone, such as the custom phones originally added in 0.3c. To replicate the old behaviour of this special action, please see the script below:

pawn Code:
if(strcmp(cmd, "/usecell",true) == 0) {
    SetPlayerSpecialAction(playerid, SPECIAL_ACTION_USECELLPHONE);
    SetPlayerAttachedObject(playerid, 4, 330, 6); // 4 = attachment slot, 330 = cellphone model, 6 = right hand
    return 1;
if(strcmp(cmd, "/stopcell",true) == 0) {
    SetPlayerSpecialAction(playerid, SPECIAL_ACTION_STOPUSECELLPHONE);
    RemovePlayerAttachedObject(playerid, 4);
    return 1;

Optional client update SA-MP 0.3d RC3-2

- Fixed problem with audio stream not always stopping when the next stream is played.
- If MoveObject() is used on an object that is already moving, the previous MoveObject() won't be finalised (it will start moving from its existing position, not the last MoveObject target position).
Although the proper behaviour of MoveObject() should be to finish the previous move before moving again, it doesn't match this behaviour in previous SA-MP versions, and the newer behaviour (introduced in 0.3d RC3) would break existing scripts.
- Fixed a game crash when surfing an object which was deleted.
- Fixed issue with player spinning when standing on a rotating object.
- Fixed some weapon issues related to the GTA engine tweaks introduced in 0.3d RC3.

Client/Server update SA-MP 0.3d RC3

- Some tweaks to the GTA:SA engine should result in increased FPS, smoother game-play, and less CPU usage for most players.
- Added final rotation parameters for MoveObject() (as default parameters).
- Added AttachObjectToObject() and object surfing on attached moving objects.
- Added example scripts: cargo ship, pirate ship, ferris wheel, for MoveObject rotation and AttachObjectToObject.
- Fixed buffer overflow in server config exec command described here:
As always, we recommend server owners never use config files or scripts from untrusted sources. Always edit your own config files and compile any pawn scripts your server uses from the .pwn file.

Important: The changes to MoveObject will not require you to change your script, however, all scripts that use MoveObject must be recompiled for SA-MP 0.3d.

Client/Server update SA-MP 0.3d RC2

- Added OnPlayerTakeDamage script callback for tracking damage events on a player.
- Fixed problems with tow trucks losing their tow around other players.
- Added DIALOG_STYLE_PASSWORD for ShowPlayerDialog() which shows a masked input box.
- The audio stream will stop playing once the player is disconnected from the server.
- Fixed problems playing certain audio IDs above 2000 in PlayerPlaySound.
- Added /audiomsg command to disable audio stream URL messages in the chat.
- The 0.3d server lists are now live.

cessil has been working on some new models for SA-MP 0.3d.
Included in SA-MP 0.3d RC2 are replacement jail cell doors, a replacement SFPD interior model with the cell doors removed, taxi signs which can be attached to any vehicle.

pawn Code:
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid)

OnPlayerTakeDamage is called when a player takes damage and loses health.

playerid is the player who has taken damage. issuerid might be the player responsible for the damage. If the player has lost health as the result of a fall or collision, the issuerid will be INVALID_PLAYER_ID. The Float:amount contains the amount of health lost by the player from this damage event. weaponid contains the weapon type which might have caused the damage, similar to OnPlayerDeath.

Changes for SA-MP 0.3d:

- Support for Shoutcast/Icecast audio streams
- All misson sounds (IDs greater than 2000) from GTA:SA single player can now be used with PlayerPlaySound
- RemoveBuildingForPlayer can be used to remove any building or object from the game
- Fixed issue with radar jumping up and down while passengering in a vehicle
- Fixed quite a few issues with the vehicle sync which might cause vehicles to warp or to appear to be moving sideways
- Fixed problems with the motorbike/pushbike sync
- Fixed surfing on train carriages
- MAX_OBJECTS has been increased to 1000
- MAX_PICKUPS has been increased to 4096
- The frame limiter will now default to 50 fps
- Fixed some small issues with the vehicle exiting animation
- Fixed game crashes related to escalators
- Server has a feature to monitor internal frame rate in the network stats string
- Fixed an issue where you might respawn on top of the last vehicle you were surfing
- Removed the PED FACTALK animation from showing up in GetPlayerAnimationIndex
- Fixed the collision on the elevator model which would allow you to jump out while it was moving down

pawn Code:
native PlayAudioStreamForPlayer(playerid, url[], Float:posX = 0.0, Float:posY = 0.0, Float:posZ = 0.0, Float:distance = 50.0, usepos = 0);
native StopAudioStreamForPlayer(playerid);

PlayAudioStreamForPlayer is used so that the player can hear a shoutcast or icecast audio stream. Formats supported are ogg/vorbis streams and MP3 streams. The audio can either by played in the background like the normal San Andreas radio, or it can be played at a particular position, and heard over a certain distance, when 'usepos' is set to 1.

The volume of the audio stream playback is controlled by the player using their San Andreas radio volume. If their San Andreas radio volume is set to 0 they will not play any audio stream sent by the server.

Under most circumstances, audio streaming should just work. If the player requires a proxy to access the web, the SA-MP client will use the proxy they have set in their Windows internet settings. However, there is an option to override the proxy by adding audioproxyoff=1 to the sa-mp.cfg file.

pawn Code:
native RemoveBuildingForPlayer(playerid, modelid, Float:fX, Float:fY, Float:fZ, Float:fRadius);

RemoveBuildingForPlayer can remove existing objects and buildings from San Andreas for a particular player. This function only needs to be called once and the model ID you specify will be removed for that player around the given point and radius. You can specify a large radius to remove all objects of particular model ID.

pawn Code:
native PlayerPlaySound(playerid, soundid, Float:x, Float:y, Float:z);

This function can now play most sound IDs found in the \data\AudioEvents.txt file in your GTA San Andreas folder.

Last edited by Kalcor; 01/12/2011 at 02:00 AM.
Kalcor is offline  
Old 12/09/2011, 04:57 PM   #2
FireCat's Avatar
Join Date: Jul 2010
Posts: 2,322
Reputation: 609
Default Re: SA-MP 0.3d RC1 test version

Very Nice!
MAX_OBJECTS has been increased to 1000
MAX_PICKUPS has been increased to 4096

Last edited by FireCat; 20/09/2011 at 06:05 PM.
FireCat is offline  
Old 12/09/2011, 04:57 PM   #3
Huge Clucker
Join Date: Oct 2007
Posts: 338
Reputation: 26
Default Re: SA-MP 0.3d RC1 test version

Woow thanks a lot
robanswe is offline  
Old 12/09/2011, 04:57 PM   #4
Join Date: Oct 2007
Location: Click To Show
Posts: 1,478
Reputation: 102
Default Re: SA-MP 0.3d RC1 test version

Will test and update this reply. Thanks.

My suggestions, smaller:

EDIT 1#: So the streams won't be loaded from scriptfiles, only internet?

EDIT 2#: It, audio streaming, doesn't seem to work as i'm using your iradio filterscript and it doesn't play it.
^ Fix! Make sure your in-game radio is on and volume is at full!

Video of the radio being uploaded.

EDIT 3#: Here's the video of radio at work!


EDIT 4#: Lampposts go poof!


Problems with objects? Try:

EDIT 5#: Area 51, clean version.

Last edited by Karlip; 24/09/2011 at 08:26 AM.
Karlip is offline  
Old 12/09/2011, 04:57 PM   #5
Posts: n/a
Default Re: SA-MP 0.3d RC1 test version

Old 12/09/2011, 04:57 PM   #6
Ash.'s Avatar
Join Date: Jan 2010
Location: England
Posts: 2,082
Reputation: 163
Default Re: SA-MP 0.3d RC1 test version


I'll edit this soon, with more compliments, as I'm expecting to give
Work, Play, Make Friends
Written from scratch, and originally released in 2011, play today!
Visit the forum | Play the game
Ash. is offline  
Old 12/09/2011, 04:58 PM   #7
SuperMarioRol's Avatar
Join Date: Dec 2009
Location: Castellón, Comunidad Valenciana, España
Posts: 1,726
Reputation: 13
Default Respuesta: SA-MP 0.3d RC1 test version


Cuenta Inactiva
Si necesitas algo escríbeme a

Buenos tiempos pasamos en SA-MP
SuperMarioRol is offline  
Old 12/09/2011, 04:58 PM   #8
Macluawn's Avatar
Join Date: Aug 2010
Location: Latvia
Posts: 613
Reputation: 78
Default Re: SA-MP 0.3d RC1 test version

oh god.
Macluawn is offline  
Old 12/09/2011, 04:58 PM   #9
Kingunit's Avatar
Join Date: Dec 2010
Location: The Netherlands
Posts: 1,426
Reputation: 120
Default Re: SA-MP 0.3d RC1 test version


Last edited by Kingunit; 29/09/2011 at 12:39 PM.
Kingunit is offline  
Old 12/09/2011, 04:59 PM   #10
Huge Clucker
Code8976Man's Avatar
Join Date: Oct 2009
Location: Stalingrad
Posts: 359
Reputation: 3
Default Re: SA-MP 0.3d RC1 test version

Wow, it's seems amazing. Thanks SA:MP TEAM.

Мощность - вымогательство - Гордость

' только невежественные манипулируют '


Code8976Man is offline  
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[GameMode] Deathmatch Test V1.0 (Test=Undone yet, making it) bestr32 Gamemode Scripts 6 20/06/2012 08:14 PM
[Test] Are you a real San Andreas knower? Test it here! Jantjuh Everything and Nothing 28 17/02/2011 11:43 AM

All times are GMT. The time now is 03:56 AM.

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