SA-MP Forums

SA-MP Forums (
-   News and Updates (
-   -   SA-MP 0.3c R3/R4/R5 server update (

Kalcor 25/07/2011 04:09 AM

SA-MP 0.3c R3/R4/R5 server update
This update is for SA-MP server owners only

We are issuing a server update for SA-MP 0.3c to address some security concerns.

If updating from an existing 0.3c R1/R2 server: you can update simply by replacing the 'samp03svr' file on linux or 'samp-server.exe' file on Windows found in the 0.3c R5 server download package.

SA-MP 0.3c R5 server

- The server crash vulnerabilities, described as resolved in the 0.3c R3/R4 server, were not completely fixed. We are making the 0.3c R5 server available. These server crash vulnerabilities only effect the Linux version of the SA-MP 0.3c server. Both Windows and Linux versions of the SA-MP server are being updated to 0.3c R5 for server version consistency.

SA-MP 0.3c R4 server

- Another denial of service vulnerability was discovered after the 0.3c R3 server release and has been fixed in the 0.3c R4 server.
- Fixes an issue with GetPlayerSurfingObjectID() returning the wrong object ID.
- Fixes a few minor problems with the format() function in pawn.

New pawn natives:
pawn Code:
native GetPlayerNetworkStats(playerid, retstr[], size);
native GetNetworkStats(retstr[], size);

The above functions return a string similar to the information seen in the player's F5 stats. It is the server's version of the network statistics which includes a list of things like network Packetloss, Upload/Download rates etc. This information might be useful in determining network problems for specific players, or for the entire server. If you are interested in these functions please see the netstats.pwn filterscript included with the Windows server package.

SA-MP 0.3c R3 server

- Fixes a denial of service vulnerability on SA-MP linux servers where a remote attacker could send a specially crafted packet which would trigger a debug assertion in SA-MP's networking layer; causing the server to shut down.

New pawn natives:
pawn Code:
native GetPlayerCameraMode(playerid);
Returns the current GTA camera mode for the requested player. The camera modes are useful in determining whether a player is aiming, doing a passenger driveby etc.

pawn Code:
native Float:GetPlayerDistanceFromPoint(playerid, Float:X, Float:Y, Float:Z);
native Float:GetVehicleDistanceFromPoint(vehicleid, Float:X, Float:Y, Float:Z);
The above functions can be used as fast alternatives to calculating distances in pawn. It is still preferable to use IsPlayerInRangeOfPoint() if you don't require the exact distance.

pawn Code:
native GetPlayerSurfingObjectID(playerid);
GetPlayerSurfingObjectID is similar to GetPlayerSurfingVehicleID. If the player is standing on a global moving object, the ID of the object will be returned. If the player is not surfing a moving object, it will return INVALID_OBJECT_ID.

New callback:
pawn Code:
forward OnUnoccupiedVehicleUpdate(vehicleid, playerid, passenger_seat);
This callback is called when a player updates the position of a vehicle they're not driving. This can happen outside of the vehicle or when the player is a passenger of a vehicle that has no driver.


SA-MP 0.3c R5 Linux Server:
SA-MP 0.3c R5 Windows Server:

Update 25/07/2011 There was a small issue regarding space padding in the format() function in the original 0.3c R3 release. If you happened to download this version, please download the above 0.3c R3-1 server.
Update 27/07/2011 0.3c R3 server was updated to SA-MP 0.3c R4.
Update 28/07/2011 0.3c R4 server was updated to SA-MP 0.3c R5.

Retardedwolf 25/07/2011 04:26 AM

Re: SA-MP 0.3c R3 server update
Seems like OnUnoccupiedVehicleUpdate could help some Roleplay servers, thanks for the update Kalcor.

[HiC]TheKiller 25/07/2011 04:28 AM

Re: SA-MP 0.3c R3 server update
Thanks for the release Kalcor, great as always :). The GetPlayerSurfingObjectID will become quite useful.

willsuckformoney 25/07/2011 04:49 AM

Re: SA-MP 0.3c R3 server update
Jizzed my pants. Good job

Toni 25/07/2011 05:15 AM

Re: SA-MP 0.3c R3 server update
Great update. I'm looking to more camera functions in the future hopefully :) those are nice, but maybe some that can be used to create easy made moving cameras? Built-in functions would be much better than those scripts with math equations and server lag timers.

Paul.eboy 25/07/2011 06:33 AM

Re: SA-MP 0.3c R3 server update
truly awesome.
we'll finally get rid of the god damn server attackers

Calgon 25/07/2011 07:28 AM

Re: SA-MP 0.3c R3 server update
Added most of the new functions to the wiki (, with the exception of GetPlayerCameraMode because I can't find any defines (like CAMERA_MODE_AIMING) in

Whitetiger 25/07/2011 07:32 AM

Re: SA-MP 0.3c R3 server update
I put GetPlayerCameraMode (in a SendClientMessage) in OnPlayerUpdate with the default LVDM.amx on my server, The server crashes within a minute, and doesn't crash when I unload this test FS.

pawn Code:
#include <a_samp>

public OnPlayerUpdate(playerid)
    new string[128];
    format(string, sizeof(string), "%d", GetPlayerCameraMode(playerid));
    SendClientMessage(playerid, 0x0FFFFFFFA, string);
    return 1;

Burridge 25/07/2011 07:47 AM

Re: SA-MP 0.3c R3 server update
Thanks for the update. What does GetPlayerCameraMode actually return? A string, float, or integer?

JernejL 25/07/2011 07:50 AM

Re: SA-MP 0.3c R3 server update
It returns an integer.

Some camera modes i found:

camera 3: tram/train passenger entering camera (??!), tram/train driver camera
camera 4: normal onfoot chasing camera (several variable distances)
camera 7: sniper aiming mode
camera 8: rpg aiming mode
camera 16: front closeup camera attached on car (+skimmer+heli+airplane)
camera 18: normal car (+skimmer+helicopter+airplane) chase camera (several variable distances)
camera 22: normal boat chase camera (several variable distances)
camera 15: chase cinematic camera (also spray garage camera)
camera 46: picture-camera camera mode
camera 51: heatseeker aiming mode
camera 53: over-shoulder on-foot aiming with a weapon (any, including minigun)
camera 55: passenger window-driveby mode
camera 56: news-reporter style chase cinematic camera (wobbbling and zooming)

All times are GMT. The time now is 01:01 AM.

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