PDA

View Full Version : SA-MP 0.3c R3/R4/R5 server update


Pages : [1] 2

Kalcor
25/07/2011, 04:09 AM
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:

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:

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.


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.


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:

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.

Downloads:

SA-MP 0.3c R5 Linux Server: http://files.sa-mp.com/samp03csvr_R5.tar.gz
SA-MP 0.3c R5 Windows Server: http://files.sa-mp.com/samp03csvr_R5_win32.zip

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
Seems like OnUnoccupiedVehicleUpdate could help some Roleplay servers, thanks for the update Kalcor.

[HiC]TheKiller
25/07/2011, 04:28 AM
Thanks for the release Kalcor, great as always :). The GetPlayerSurfingObjectID will become quite useful.

willsuckformoney
25/07/2011, 04:49 AM
Jizzed my pants. Good job

Toni
25/07/2011, 05:15 AM
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
truly awesome.
we'll finally get rid of the god damn server attackers

Calgon
25/07/2011, 07:28 AM
Added most of the new functions to the wiki (http://wiki.sa-mp.com/wiki/Special:Recentchanges), with the exception of GetPlayerCameraMode because I can't find any defines (like CAMERA_MODE_AIMING) in a_players.inc.

Whitetiger
25/07/2011, 07:32 AM
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.

#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
Thanks for the update. What does GetPlayerCameraMode actually return? A string, float, or integer?

JernejL
25/07/2011, 07:50 AM
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)

Burridge
25/07/2011, 07:52 AM
Oh, cool! Thanks, JernejL.

Calgon
25/07/2011, 08:04 AM
Thanks, I added a wiki entry for it now.

Blantas
25/07/2011, 08:11 AM
Thank you for the update.

Kalcor
25/07/2011, 08:19 AM
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.

#include <a_samp>

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



I'm attempting to confirm this problem. Can you give more info? Are you running this on Windows or Linux? Can you provide the crashinfo.txt file or a gdb backtrace from linux?

Edit:

Unable to confirm problem. I have tested the conditions described on both Windows and Linux servers.

cristab
25/07/2011, 08:31 AM
no crash for me with windows server and linux with your code

[HiC]TheKiller
25/07/2011, 08:32 AM
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)

In addition to those

Camera 0: Not spawned at all
Camera 15: Seems to happen while you are spawning + entering a interior + Gambling

Raimis_R
25/07/2011, 08:47 AM
Very nice!

Scottas
25/07/2011, 08:54 AM
I thought you are dead

Martin_M
25/07/2011, 09:01 AM
Finally something new, nice job, Kalcor. Try to update SA-MP with images/sounds uploading to the server without any plugins or something like that.
Good luck ;]

Vvolk
25/07/2011, 09:19 AM
Wow this upgrade is so cool I realy like these new natives because they are very helpful. Thanks!

Danny
25/07/2011, 09:22 AM
Nice, thanks.

[03]Garsino
25/07/2011, 09:50 AM
Cheers for the update. Even though I don't script anymore I think it will come in handy for most of the scripters out there. :)

Littl3j0hNy
25/07/2011, 10:23 AM
Great Update :)

leong124
25/07/2011, 10:35 AM
Great. Is there any scripting bug fixed?

xRk
25/07/2011, 10:42 AM
Great update

RAEN
25/07/2011, 01:01 PM
New callback:

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.



If OnVehicleStreamIn, and vehicle falling down, the server think OnUnoccupiedVehicleUpdate. It's bad, because player not touch this vehicle (only OnVehicleStreamIn).

Haji
25/07/2011, 01:06 PM
thanks for update, Kalcor this will be useful.

SDraw
25/07/2011, 01:35 PM
URL is broken :( I can't download this new version of server :(

AirKite
25/07/2011, 01:43 PM
Awesome. Thanks for OnUnoccupiedVehicleUpdate!!!

BillyCoolGR
25/07/2011, 01:47 PM
This update didn't fix the server crashes....

Meta
25/07/2011, 02:12 PM
Thanks Kalcor for releasing a new Update finally :D
keep up working :)

jojllman
25/07/2011, 02:13 PM
Useful functions & callback added.
Great job!

Meta
25/07/2011, 02:38 PM
Made the Macros
I noticed that 15 also appears at cinematic view

#define CAMERAMODE_ENTERTRAIN 3
#define CAMERAMODE_DEFAULT 4
#define CAMERAMODE_SNIPER 7
#define CAMERAMODE_RPG 8
#define CAMERAMODE_GARAGE 15
#define CAMERAMODE_CARBUMPER 16
#define CAMERAMODE_CARORPLANE 18
#define CAMERAMODE_BOAT 22
#define CAMERAMODE_CAMERA 46
#define CAMERAMODE_HEATSEEKER 51
#define CAMERAMODE_AIMING 53
#define CAMERAMODE_DRIVEBY 55
#define CAMERAMODE_CINEMA 56

CameraMode does not change while spectating something, but if you stop spectating you get CameraMode 3.
When SetPlayerCameraPos is used, you get 15

Donya
25/07/2011, 03:00 PM
haha nice, i also found this http://pastebin.com/asXqgsQk

^^oh meta posted them already

scrap that ^;D Great update Kalcor and the team!

Meta
25/07/2011, 03:30 PM
Yes, I also used the pastebin link to check the modes and name them correctly

leong124
25/07/2011, 03:53 PM
If OnVehicleStreamIn, and vehicle falling down, the server think OnUnoccupiedVehicleUpdate. It's bad, because player not touch this vehicle (only OnVehicleStreamIn).

It's made like that. Since it is streamed in for a player, there's update of its position and other information. That's OnUnoccupiedVehicleUpdate.

IMHO, this may help server owners detect vehicle cheaters.

[GRB]Stakline
25/07/2011, 04:18 PM
Niceeeeee!

Donya
25/07/2011, 04:23 PM
0xB6F0DC - [dword] Current View:
0 = bumper View
1 = close external view
2 = middle external view
3 = furthest external view
4 = nothing = same as last?
5 = cinematic view
6 to INF = same as 4?
0xB6F0E0 - [float] Car View Distance (arm length)
0xB6F0E8 - [float] True View Distance (true arm length)

can't the first one be used for something like GetPlayerCameraModeInVehicle(playerid);? S:

Raimis_R
25/07/2011, 06:17 PM
Sometimes then i turning on server - crash.

Crash Info

SA-MP Server: 0.3c R3-1



Exception At Address: 0x78571C72



Registers:

EAX: 0x000007DE EBX: 0x1000D13C ECX: 0x7FFFFFFE EDX: 0x00000073

ESI: 0x00000000 EDI: 0x000007DE EBP: 0x0012E8D4 ESP: 0x0012E650

EFLAGS: 0x00010202



Stack:

+0000: 0x01AAA768 0x00000000 0x00000000 0x00000000

+0010: 0x00000001 0x00000000 0x00000007 0x0012E708

+0020: 0x7858CF3E 0x00000000 0x00AA3FA8 0x00AA2D50

+0030: 0x00AA1E90 0x0012E701 0x0012E8F8 0x00000000

+0040: 0x00000000 0x00000000 0x1000D13C 0x00000000

+0050: 0x00000000 0x00000000 0x0012E74C 0x00000040

+0060: 0x0012EA90 0x00000008 0x000007DE 0xFFFFFFFF

+0070: 0x7312E74C 0x00000000 0x78542E2B 0x00AA0178

+0080: 0x0012E6DC 0x00AA74C0 0x00000013 0x0012E718

+0090: 0x785557B4 0x00AA0178 0x785557AB 0xA822E573

+00A0: 0x0000000C 0x785556F0 0x00000000 0x785B7408

+00B0: 0x0012E6EC 0x00AA1E90 0x0012E97C 0x7858CF3E

+00C0: 0xD06ACDAB 0xFFFFFFFE 0x00000169 0x7848CF2B

+00D0: 0x785B7408 0x784818FC 0x00000040 0x01AAA768

+00E0: 0x7C90DC4C 0x7C810CC0 0x00000160 0x0012E770

+00F0: 0x0012E778 0x00000008 0x0000000E 0xFFFFFFFF

+0100: 0x00000003 0x785BD6A0 0x000A2000 0x00000000

+0110: 0x000A116B 0x00000000 0x00000001 0x00000000

+0120: 0x00000000 0x00000000 0x000A116B 0x00000000

+0130: 0x0012E7A8 0x785893E7 0x00000160 0x00000000

IstuntmanI
25/07/2011, 06:51 PM
GetPlayerCameraMode is really usefull, thanks Kalcor !

FireCat
25/07/2011, 06:58 PM
So if you use GetPlayerCameraMode(playerid); for IsPlayerAiming, = wins all the IsPlayerAiming includes?

Bubelbub
25/07/2011, 07:12 PM
New callback:

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.

My own English:
I used this on my Roleplay Server.
But i move a Vehicle with a Player or without a Player and i get no Message.
Test Code is at the End of this Post.

Google English:
With me on my server it does not work.
I push a car back and forth.
Whether a person is sitting inside or not, I get no message.
The test code is at the end.

And German :):
Bei mir auf meinem Server klappt das nicht.
Ich schiebe ein Auto hin und her.
Egal ob eine Person drinnen sitzt oder nicht, ich erhalte keine Meldung.
Der Test Code ist am Ende.

Test Code:
public OnUnoccupiedVehicleUpdate(vehicleid, playerid, passenger_seat)
{
new string[128];
format(str, 128, "Test [%d] [%d] [%d]", vehicleid, playerid, passenger_seat);
return SendClientMessageToAll(0xFFFF00FFm string);
}

Deskoft
25/07/2011, 07:15 PM
Awesome update, good job as always Kalcor.

RenisiL
25/07/2011, 07:59 PM
Not bad :))) keep it up :))

HP
25/07/2011, 09:42 PM
Test Code:
public OnUnoccupiedVehicleUpdate(vehicleid, playerid, passenger_seat)
{
new string[128];
format(str, 128, "Test [%d] [%d] [%d]", vehicleid, playerid, passenger_seat);
return SendClientMessageToAll(0xFFFF00FFm string);
}


This is not how you should use it. There is pretty much everything explained in the wiki.


public OnUnoccupiedVehicleUpdate(vehicleid, playerid, passenger_seat) {
new
Float: fVehicle[3]; // Array to store the vehicle's co-ordinates

GetVehiclePos(vehicleid, fVehicle[0], fVehicle[1], fVehicle[2]); // Get vehicle co-ordinates and store them into the array we created before
if(!IsPlayerInRangeOfPoint(playerid, 10, fVehicle[0], fVehicle[1], fVehicle[2])) { // If player is not in range of the vehicle we checked (furthest distance in the given example is 10)
// Code for the callback, which gets called if player moves the vehicle and is not driving
return;
}
}

IllidanS4
25/07/2011, 09:43 PM
I've found some new camera modes.

#define CAMERA_MODE_NONE 0
#define CAMERA_MODE_INTRAIN 3
#define CAMERA_MODE_ONFOOT 4
#define CAMERA_MODE_AIM_SNIPER 7
#define CAMERA_MODE_AIM_ROCKETLAUNCHER 8
#define CAMERA_MODE_FIXED_ATSIDE 14
#define CAMERA_MODE_FIXED_POS 15
#define CAMERA_MODE_FIXED_CARBUMPER 16
#define CAMERA_MODE_INCAR 18
#define CAMERA_MODE_INBOAT 22
#define CAMERA_MODE_AIM_CAMERA 46
#define CAMERA_MODE_AIM_HEATSEEKER 51
#define CAMERA_MODE_AIM 53
#define CAMERA_MODE_DRIVEBY 55
#define CAMERA_MODE_FIXED_CINEMA 56
#define CAMERA_MODE_FIXED_CINEMA_FLYOVER 57
#define CAMERA_MODE_FIXED_CINEMA_ZOOM 58
#define CAMERA_MODE_FIXED_CINEMA_UNDER 59
#define CAMERA_MODE_FIXED_CINEMA_SIDE 62
#define CAMERA_MODE_FIXED_CINEMA_ROUND 63
#define CAMERA_MODE_FIXED_CINEMA_HEADON 64

Modes 62 - 64 are available only in plane. Fixed camera is when you can't control it by mouse.

JernejL
25/07/2011, 10:04 PM
This update didn't fix the server crashes....

Put on crashdetect plugin..

Riddick94
25/07/2011, 10:14 PM
Kalcor.. please.. i beg of you.. please FINALLY define this keys for OnPlayerKeyStateChange.. I mean KEY_LETTER_R for example.. and all other keys.. let us do something on other keys than this what we have now. Some user made a plugin but only for server host keys working.. so.. do this, please! I waiting for keys from 0.2x version.. maybe it's finally time to made it?

kurta999
25/07/2011, 10:34 PM
(I think) it's not possible without client side modifications, and i think you can wait for this minimun in the next version because for this must update all players.

Strawhats
25/07/2011, 10:34 PM
Great, though I really want to know how to read player crash codes...
Still unable to do that.

HostingTime.de
25/07/2011, 10:48 PM
Thanks Kalcor,

the Update work on all Servers.

Fine

HP
25/07/2011, 10:51 PM
Great, though I really want to know how to read player crash codes...
Still unable to do that.

There was a perfectly detailed post somewhere, I remember how I tried to understand it.

Strawhats
25/07/2011, 11:10 PM
wow! Do you still have the link!?

I really wan t it!

SamyRomafia
25/07/2011, 11:20 PM
Thanks Kalcor :)

HP
25/07/2011, 11:39 PM
No, sorry. I do not have the link any longer, but you can always use the search.

Strawhats
25/07/2011, 11:47 PM
Couldn't find it, its probably deleted :(

Ork3n
25/07/2011, 11:58 PM
Nice, Thanks for the update

HP
26/07/2011, 12:21 AM
Couldn't find it, its probably deleted :(

Maybe, but I did find this.

To explain it simply, imagine every program loaded had line numbers like this:

GTA SA lines 0-10000
SA-MP lines 10001-14000
Steam lines 14001-20000 etc

If the program crashed and it gave you the line number 11111, you could figure out that crash happened in SA-MP. You could even dig deeper and figure out the exact line that caused the crash.

The RAM area where programs run is quite large and the line numbers (or memory addresses) are written in hex.

I know from spending a lot of time with this game that GTA SA is loaded between hex numbers 0x00400000 and 0x015F0000 and SA-MP is loaded at 0x3A000000.

If I see a crash report and it has numbers like 0x61F2BB69 and 0x77CABB45, I know those line numbers are not in GTA SA or SA-MP, so they could be in another loaded program like XFire, Steam - or really anything. The crash address just tell me that it didn't crash inside GTA SA's code or SA-MP's. From there I can start make some guesses about what it might be.

It may seem complicated but it's actually very simple. You just need to know where each part of the program is loaded in memory.

There is a little bit more to this also. The "Stack" section allows me to see what line numbers were run before it crashed. So if the crash address was in GTA SA but the stack also had addresses from SA-MP, I could tell that; although it crashed in GTA SA, the crash was caused by something SA-MP did.

That's the basics of it anyway.

AlexD1151
26/07/2011, 12:40 AM
Thanks for the update SA:MP kalcor :D

leong124
26/07/2011, 04:32 AM
Test Code:
public OnUnoccupiedVehicleUpdate(vehicleid, playerid, passenger_seat)
{
new string[128];
format(string, 128, "Test [%d] [%d] [%d]", vehicleid, playerid, passenger_seat);
return SendClientMessageToAll(0xFFFF00FF, string);
}
....

willsuckformoney
26/07/2011, 05:41 AM
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)

I got 7 for driveby mode, used tec.

Pablo Borsellino
26/07/2011, 06:30 AM
Little but usefull Update - thanks Kalcor!

John_Lennon
26/07/2011, 07:04 AM
Cool! So now people will be able to surf on cars without being teleported somewhere else?

BuLLeT[LTU]
26/07/2011, 07:13 AM
I don't know if it's a bug but it's with boats. I don't touch boat but OnUnoccupiedVehicleUpdate sends me a message.

FANEX
26/07/2011, 07:21 AM
Well done Kalcor.
Thanks. :)

Mark™
26/07/2011, 08:06 AM
thx fr the update kalcor !

bocian941
26/07/2011, 08:54 AM
Kalcor, check this bug http://forum.sa-mp.com/showthread.php?t=271797

Meta
26/07/2011, 09:02 AM
;1311188']I don't know if it's a bug but it's with boats. I don't touch boat but OnUnoccupiedVehicleUpdate sends me a message.

It's also sent if you push it down a mountain for example (while it's moving).

Strawhats
26/07/2011, 09:32 AM
So hp, you are saying that if a code with 0x004 isnt scriptbased?

Bubelbub
26/07/2011, 10:03 AM
This is not how you should use it. There is pretty much everything explained in the wiki.


public OnUnoccupiedVehicleUpdate(vehicleid, playerid, passenger_seat) {
new
Float: fVehicle[3]; // Array to store the vehicle's co-ordinates

GetVehiclePos(vehicleid, fVehicle[0], fVehicle[1], fVehicle[2]); // Get vehicle co-ordinates and store them into the array we created before
if(!IsPlayerInRangeOfPoint(playerid, 10, fVehicle[0], fVehicle[1], fVehicle[2])) { // If player is not in range of the vehicle we checked (furthest distance in the given example is 10)
// Code for the callback, which gets called if player moves the vehicle and is not driving
return;
}
}


Year.
Thank you.

I really forgot to look into the Sa-MP Wiki.
Omg.

At the next, i look first in the Sa-MP Wiki, before i try my own Ideas.
xDD
(((((( Nächstes mal gucke ich erst in die Sa-MP Wiki, bevor ich meine eigenen Ideen umsetze. )))))

HP
26/07/2011, 10:14 AM
So hp, you are saying that if a code with 0x004 isnt scriptbased?


GTA SA is loaded between hex numbers 0x00400000 and 0x015F0000 and SA-MP is loaded at 0x3A000000.

I don't think it has something to do with scrpting, but as far as I understand 0x00400000 to 0x015F0000 means, that the problem is related to GTA:SA, just like Kalcor said. As of SA-MP is loaded at 0x3A000000, I assume the script based crashes are also in that format.

I do not know much about it, but I do try to learn as much as I can.

Strawhats
26/07/2011, 03:53 PM
ok thank you!

TouR
26/07/2011, 04:36 PM
Kepp up the good work Kalcor. Thank you for releasing this

Nexotronix
26/07/2011, 08:26 PM
New callback:

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.

The best update!

Anzipane!
26/07/2011, 09:05 PM
Great job as always, thanks for the update SA:MP team. :)

TheArcher
26/07/2011, 10:17 PM
I like the new functions.

BeckzyBoi
27/07/2011, 04:45 AM
Does anybody have any ideas of how GetPlayerCameraMode and OnUnoccupiedVehicleUpdate can be put to good use?

Donya
27/07/2011, 05:02 AM
Does anybody have any ideas of how GetPlayerCameraMode and OnUnoccupiedVehicleUpdate can be put to good use?

Hitting empty vehicles and deducing health.

GetPlayerCameraMode = isplayeraiming

FANEX
27/07/2011, 09:06 AM
A question: Why this version doesn't appear on "Downloads" page http://www.sa-mp.com/download.php ?
It's still the previous version there, SA-MP 0.3c R2-2 :confused:
I think this version is still under working, that's why.
So, people must wait until the last version (0.3c R3-2) have no bugs, or something like that?
Whatever...

Cypress
27/07/2011, 09:30 AM
After installing 0.3 R3 server i got a problem with all checking parameters


if(player == INVALID_PLAYER_ID)


It returns 0. Also when i switched the server back to 0.3c R2 it worked good.

Meta
27/07/2011, 09:32 AM
and what is 'player' ?

Burridge
27/07/2011, 09:58 AM
Cypress: Are you using SScanf, using the 'u' perimeter?

Cypress
27/07/2011, 10:52 AM
Cypress: Are you using SScanf, using the 'u' perimeter?

Yes.


new player;

if(sscanf(params, "u", player))

if(player == INVALID_PLAYER_ID)

TheArcher
27/07/2011, 11:00 AM
Seems R4 will be released soon.

Burridge
27/07/2011, 11:35 AM
Cypress: Either change 'u' to 'd' (I did and it works like a charm), or revert to R2 server until Y_Less fixes the plugin. Or, with luck R4 will be released soon, and maybe that will fix it.

AirKite
27/07/2011, 12:05 PM
Example use: OnUnoccupiedVehicleUpdate
http://forum.sa-mp.com/forumdisplay.php?f=21

cyber01
27/07/2011, 12:39 PM
Kalcor, but you can find out what this package (the calling debug) and how it goes? Just for some reason do not want to upgrade to R3, but I want to block this type of packages at the level of OSes and hardware (tools allow). It is desirable to package itself and how it goes (it can be in PM)

Kalcor
27/07/2011, 12:59 PM
Kalcor, but you can find out what this package (the calling debug) and how it goes? Just for some reason do not want to upgrade to R3, but I want to block this type of packages at the level of OSes and hardware (tools allow). It is desirable to package itself and how it goes (it can be in PM)

It is not possible. It is a low level netcode handling problem, not a specific packet.

Haji
27/07/2011, 01:24 PM
Cypress: Either change 'u' to 'd' (I did and it works like a charm), or revert to R2 server until Y_Less fixes the plugin. Or, with luck R4 will be released soon, and maybe that will fix it.
how you know about R4?

[03]Garsino
27/07/2011, 01:28 PM
how you know about R4?

Thanks for the detailed report. I plan to release a 0.3c R4 server shortly to address this and some other minor issues.
[...]

nuff said

Burridge
27/07/2011, 01:28 PM
Because Kalcor announced it himself here (http://forum.sa-mp.com/showpost.php?p=1313069&postcount=10).

EDIT: And the fact that it's just been released in this topic..

leong124
27/07/2011, 01:45 PM
Thanks, and hope it will be stable :P

[03]Garsino
27/07/2011, 01:46 PM
Thanks for the R4 update!

FireCat
27/07/2011, 01:47 PM
Love the R4, thank you :)

DiDok
27/07/2011, 01:56 PM
Is the sscanf bug still there?

AndreT
27/07/2011, 02:08 PM
Is the sscanf bug still there?
I just tested with 2 players and the u-specifier seems to work properly.

Thanks a lot for this update!

IllidanS4
27/07/2011, 02:12 PM
Kalcor, please add SetPlayerGravity! It worked with YSF perfectly!

Haji
27/07/2011, 02:18 PM
now i see, thanks for R4 version.

HP
27/07/2011, 02:33 PM
Thanks for the update. Just for curiosity, why is the size of command's string 256+1 cells big(in netstats.pwn)? Isn't the limit for text I/O 128 cells and is that "+1" for NULL character or what? Maybe you could also add a console command for netstats? Eg. calling a command "netstats" from console would print the information. Alternatively there could be used JaTochNietDan's Execute plugin for now.

Anzipane!
27/07/2011, 02:34 PM
Wow, very fast updates, I'm really impressed. Amazing work!

TheGuardianAngel
27/07/2011, 02:38 PM
so lets stay tuned cause a next version is comming , i mean you didn't jump from the bed at 12 o`clock in the morning and sayed "lets add some GetNetworkStats" xD

leong124
27/07/2011, 02:53 PM
sscanf bug is still here.
We'll need to wait for the confirmation of R4 to be stable so that Y_Less will start to fix it.

Thanks for the update. Just for curiosity, why is the size of command's string 256+1 cells big(in netstats.pwn)? Isn't the limit for text I/O 128 cells and is that "+1" for NULL character or what? Maybe you could also add a console command for netstats? Eg. calling a command "netstats" from console would print the information. Alternatively there could be used JaTochNietDan's Execute plugin for now.

For the 128 problem, seems that it's just an example script, it is not important enough to change (though it is still improvable).
For the RCON command, you can do that after getting that network statistics string, and print it in the console.

Scottas
27/07/2011, 02:55 PM
Another update so soon? So we can expect new version soon or after New Years :D

[L3th4l]
27/07/2011, 02:56 PM
Thanks for the network stats functions.

vyper
27/07/2011, 03:08 PM
;1313464']Thanks for the network stats functions.

This.

IstuntmanI
27/07/2011, 03:11 PM
Fast update ... thanks Kalcor !

[HiC]TheKiller
27/07/2011, 03:12 PM
Thanks for the update, I'm going to test the new functions out now :).

Rimas
27/07/2011, 03:25 PM
Nice, thanks for update :)

FANEX
27/07/2011, 03:29 PM
Awesome functions Kalcor! Thanks for the update.
There will be other updates soon? However, this was really fast.

EDIT: Also, when we find this on "Downloads" page http://www.sa-mp.com/download.php ??

WoodPecker
27/07/2011, 03:37 PM
Thanks for the update guys.

kurta999
27/07/2011, 03:52 PM
Very nice update.

But the Packetloss in the client everytime is 0% and when you get with GetPlayerNetworkStats then not.
Anyway will be very good, if you add player game static for the network state or add new function for it( StreamMemory usage, RWObjects, ObjectSlotUsed. )

SchurmanCQC
27/07/2011, 04:02 PM
I like the NetStats, that would become very useful if you'd like to troubleshoot network problems, lag for specific players etcetera.

davve95
27/07/2011, 04:13 PM
Thanks Kalcor for the update! :D

Burridge
27/07/2011, 04:17 PM
Awesome, NetworkStats. :D

Scottas
27/07/2011, 04:42 PM
What can we get from GetPlayerNetworkStats abous player? We can know if player desynced if I understand good? Also, what important info about player can we get from this function too?

Venice
27/07/2011, 05:07 PM
Nice Updae Kye

serman
27/07/2011, 05:13 PM
Really Awesome Update :D

Calgon
27/07/2011, 05:13 PM
What can we get from GetPlayerNetworkStats abous player? We can know if player desynced if I understand good? Also, what important info about player can we get from this function too?

/netstats from netstats.pwn shows:

http://pokit.org/get/d52b4ce4f18c40ab95b9f00a1b7b9c1d.png

jamesbond007
27/07/2011, 05:16 PM
btw what was wrong with current format function??

[L3th4l]
27/07/2011, 05:28 PM
btw what was wrong with current format function??

http://forum.sa-mp.com/showthread.php?t=271797

Scottas
27/07/2011, 05:42 PM
/netstats from netstats.pwn shows:

http://pokit.org/get/d52b4ce4f18c40ab95b9f00a1b7b9c1d.png

I've seen that. But is it possible to get players fps from these?

Finn
27/07/2011, 05:45 PM
I always like new updates, but how hard would it be to make a function which returns fireline vectors?

That would open so many new possibilities for scripters.

shaikh007
27/07/2011, 05:54 PM
great update.

kurta999
27/07/2011, 06:34 PM
I've seen that. But is it possible to get players fps from these?

With this not possible, but here (http://forum.sa-mp.com/showpost.php?p=831686&postcount=22) the simple script.

Burridge
27/07/2011, 06:56 PM
I would suggest using JernejL's (http://forum.sa-mp.com/showthread.php?t=172085) instead.

Ari3l
27/07/2011, 07:50 PM
Awesome! :)

[GF]Sasino97
27/07/2011, 08:02 PM
Thanks for the new R4 :)! That's fantastic...

Haji
27/07/2011, 08:08 PM
If releases comes at this tempo, then we can expect 0.3d or 0.4 soon! :)

Raimis_R
27/07/2011, 08:31 PM
If releases comes at this tempo, then we can expect 0.3d or 0.4 soon! :)

I doubt it.

juraska
27/07/2011, 09:37 PM
Thanks for the update !

MisterTickle
27/07/2011, 11:15 PM
My NPC's won't connect.. It blocks the connection

Blocking due to a 'server full' attack (1)

Edit: Okay I fixed that but.. sscanf2 doesn't appear to be working correctly

BeckzyBoi
28/07/2011, 01:52 AM
Hitting empty vehicles and deducing health.

GetPlayerCameraMode = isplayeraiming

What other uses are there from OnUnoccupiedVehicleUpdate?

And how can IsPlayerAiming be useful? What uses are their from detecting whether a player is aiming?

Meta
28/07/2011, 02:16 AM
Bug: Network stats texts are wrong: (left pic taken a few seconds after the right one)
http://img6.imagebanana.com/img/g8l5pzu6/Bug.png

Snipa
28/07/2011, 03:19 AM
Oops, updated without looking @ comments. Meh, Kalcor, when will sscanf support be added?

Kalcor
28/07/2011, 04:31 AM
Bug: Network stats texts are wrong: (left pic taken a few seconds after the right one)


No, that's actually right. The stats on the client and server won't be a mirror copy because the internet stands between them. They should be reasonably close though, within 1-2%. The internet is not 100% reliable and certain types of messages will not be resent by SA-MP. Packetloss between client/server and server/client might also be different.

Also, "a few seconds" is actually a long time in real-time game. That might also explain some of the differences.

Oops, updated without looking @ comments. Meh, Kalcor, when will sscanf support be added?

sscanf() isn't written by SA-MP. If a plugin doesn't work between SA-MP server versions it obviously uses memory hacking. You'll need to ask the author of the plugin whether they'll update it. This is why we have always discouraged creating/using memory hacking plugins.

Meta
28/07/2011, 04:41 AM
No, that's actually right. The stats on the client and server won't be a mirror copy because the internet stands between them. They should be reasonably close though, within 1-2%. The internet is not 100% reliable and certain types of messages will not be resent by SA-MP. Packetloss between client/server and server/client might also be different.Ok, thanks.
I've been confused, I thought some texts were placed on wrong parts of the netstats



EDIT: Now I understood why it seemed wrong to me.
The stats like sent and recived per player are inverted, so they are the serversides stats e.g. the bytes the server recived from player, right?

Kalcor
28/07/2011, 09:49 AM
EDIT: Now I understood why it seemed wrong to me.
The stats like sent and recived per player are inverted, so they are the serversides stats e.g. the bytes the server recived from player, right?

Yes, that's right. You have them coloured correctly.

Karlip
28/07/2011, 10:00 AM
I don't know if this is related, but after R4, i've noticed that some car parts are different color than the rest of the car.

Only seemed to happen once.

dnee
28/07/2011, 11:07 AM
I don't know, It's bug of R4 ?

When I used this command.

tmp = strtok(cmdtext, idx);
printf("Test");
new test= ReturnUser(tmp);
printf("%d", test);


It doesn't do anythings. I think, it's bug of format change in R4.

Thanks.

AndreT
28/07/2011, 11:10 AM
I don't know, It's bug of R4 ?

When I used this command.

tmp = strtok(cmdtext, idx);
printf("Test");
new test= ReturnUser(tmp);
printf("%d", test);


It doesn't do anythings. I think, it's bug of format change in R4.

Thanks.
Does the exactly same code produce any better results in R2?

dnee
28/07/2011, 11:14 AM
Does the exactly same code produce any better results in R2?

yes it is.

dugi
28/07/2011, 12:38 PM
I don't know, It's bug of R4 ?

When I used this command.

tmp = strtok(cmdtext, idx);
printf("Test");
new test= ReturnUser(tmp);
printf("%d", test);


It doesn't do anythings. I think, it's bug of format change in R4.

Thanks.

You should elaborate on your issue a bit more as currently your report is not making much sense. I suggest posting it in Bug Reports section also.

Amit_B
28/07/2011, 04:03 PM
R5 :)

GhoulSlayeR
28/07/2011, 04:08 PM
Thanks!

leong124
28/07/2011, 04:24 PM
The frequency of releasing new version of the server is just like 0.3a and 0.3c RC.
Still, it's very nice to see quick updates:D

davve95
28/07/2011, 04:39 PM
Are this just to servers?? I think its.... :/ But good I will have a server soon :p

Kalcor when will 0.3d come?? :D

IstuntmanI
28/07/2011, 04:57 PM
Kalcor, you're awesome !

So, the servers won't crash when somebody flood them ? :D

regdude
28/07/2011, 04:58 PM
Anyone else noticed that sscanf doesn't work?

Mean
28/07/2011, 04:58 PM
Kye has really put some effort these past few days.

Way to go!

dugi
28/07/2011, 05:01 PM
Anyone else noticed that sscanf doesn't work?

You have to wait until the author of the sscanf plugin updates it.

Michael@Belgium
28/07/2011, 06:00 PM
Wow ... 3 updates in 1 week xD Good job !!

rbN.
28/07/2011, 06:01 PM
UPDATES GOING FAST.

Awesome :)

Mikkel_Pedersen
28/07/2011, 06:02 PM
Thanks for a new update with a pair of new nice functions, and nice to see the wiki updated so fast after the updates were here.

Haji
28/07/2011, 06:48 PM
Thanks for R5 version.

P.S Tomorrow R6 will be released :D

Gh0sT_
28/07/2011, 06:50 PM
End of the world coming.

Snipa
28/07/2011, 06:57 PM
End of the world coming.



This relates to new server version releases, how exactly?

Keep the updates coming! <3 (No homo)

Gh0sT_
28/07/2011, 07:09 PM
This relates to new server version releases, how exactly?

Keep the updates coming! <3 (No homo)Look at your signature :cool:

No, with that sentence I wanted to say that this is fakin awesome. :P

dowster
28/07/2011, 07:21 PM
WOW, its like update mania, keep it up man :)

DreeH
28/07/2011, 08:46 PM
Good job.

BeckzyBoi
28/07/2011, 09:18 PM
What other uses are there from GetPlayerCameraMode and OnUnoccupiedVehicleUpdate?

I am only asking because there must be some use for them otherwise they wouldn't have been added.

Thanks

Meta
28/07/2011, 09:24 PM
GetPlayerCameraMode:

You could check if a player uses cinema view or front bumper view in a vehicle
You can see wheather a player is in a garage or not
You can see wheather a player is passenger-drivebying or not
...


OnUnoccupiedVehicleUpdate:

You can prevent players pushing around vehicles.
You could script sth that resets the vehicle if a passenger was AFK and returned ingame (teleports the vehicle to where the passenger went AFK)
In some case you can create a script for damaging unoccupied vehicles like seen in scripting showroom in the sa-mp.com Forums
...

lolumadd_
29/07/2011, 01:58 AM
I am using the Linux version and I replaced the samp03svr file and tried to start it again, and it wouldn't start.

BeckzyBoi
29/07/2011, 02:42 AM
GetPlayerCameraMode:

You could check if a player uses cinema view or front bumper view in a vehicle
You can see wheather a player is in a garage or not
You can see wheather a player is passenger-drivebying or not
...


OnUnoccupiedVehicleUpdate:

You can prevent players pushing around vehicles.
You could script sth that resets the vehicle if a passenger was AFK and returned ingame (teleports the vehicle to where the passenger went AFK)
In some case you can create a script for damaging unoccupied vehicles like seen in scripting showroom in the sa-mp.com Forums
...


Nothing else?

lolumadd_
29/07/2011, 02:56 AM
also, some of my commands dont work anymore..

SHITTTT

Sscanf doesnt work on this update

AndreT
29/07/2011, 03:19 AM
Sscanf doesnt work on this update
We'll have to wait a day or two.

Meta
29/07/2011, 03:22 AM
Nothing else?

there are some more possibilities, but I don't know more stuff at the moment, use your creativity and create sth.

shaikh007
29/07/2011, 04:48 AM
Another update. woohoo. Thanks to Kalcor for his hard work for samp

FANEX
29/07/2011, 07:15 AM
Thanks Kalcor! Your job is... hard.
Good job.

WoodPecker
29/07/2011, 07:33 AM
Wow nice job guys, i hope we will see the new update soon.

Steven82
29/07/2011, 08:03 AM
Sscanf doesnt work on this update

Confirmed...all the commands in my server stopped working. And read this topic and was all happy since i was not the only one experiencing this issue.

Mark™
29/07/2011, 08:11 AM
R5 ? are u updating regularly frm now on ?

FANEX
29/07/2011, 08:20 AM
R5 ? are u updating regularly frm now on ?
So, what's wrong with that?
He must do his job. It's important to fix every bugs possible to have an ultimate version. :cool:
(I joke with "ultimate" of course, maybe impossible)

GangsTa_
29/07/2011, 08:27 AM
Good job.

BuLLeT[LTU]
29/07/2011, 08:34 AM
So, what's wrong with that?
He must do his job. It's important to fix every bugs possible to have an ultimate version. :cool:
(I joke with "ultimate" of course, maybe impossible)

It's possible. But maybe they don't have time or don't want to make it.

Gh0sT_
29/07/2011, 11:00 AM
I think, GetNetworkStats and that other function should be made with params to store each value, like with GetVehicleParamsEx(vehid, variables_to_store_value);, because now there's no point to use it I think? Its same as press F5

Meta
29/07/2011, 11:05 AM
Script it ^^

Gh0sT_
29/07/2011, 11:33 AM
Script it ^^Funny opinion, bro. Why this function is even added when we need to "recreate" it?

Meta
29/07/2011, 11:46 AM
You need it - you do it.

btw I just added the Wiki pages for those two functions:

GetNetworkStats (http://wiki.sa-mp.com/wiki/GetNetworkStats)
GetPlayerNetworkStats (http://wiki.sa-mp.com/wiki/GetPlayerNetworkStats)

Gh0sT_
29/07/2011, 11:49 AM
You need it - you do it.

btw I just added the Wiki pages for those two functions:

GetNetworkStats (http://wiki.sa-mp.com/wiki/GetNetworkStats)
GetPlayerNetworkStats (http://wiki.sa-mp.com/wiki/GetPlayerNetworkStats)WTF? Who needs a function which is same as press a key PLUS when u press that "key" it updates automaticly..

WooTFTW
29/07/2011, 11:54 AM
Is there any aiming mode when spraying with spray can?

DiDok
29/07/2011, 12:00 PM
WTF? Who needs a function which is same as press a key PLUS when u press that "key" it updates automaticly..
You press a key to check other players' ans server's netstats? Please tell me which one is it, F5 doesn't show it...

Use your bloody head sometimes ::)

Gh0sT_
29/07/2011, 12:05 PM
You press a key to check other players' ans server's netstats? Please tell me which one is it, F5 doesn't show it...

Use your bloody head sometimes ::)Ok, you beat me, however this can be made better, as I said. :/

IllidanS4
29/07/2011, 12:41 PM
Is there any aiming mode when spraying with spray can?

Nope

Voldemort
29/07/2011, 01:24 PM
Nice updates, I love this native GetPlayerCameraMode(playerid);, keep up great job samp team

Calgon
29/07/2011, 01:59 PM
WTF? Who needs a function which is same as press a key PLUS when u press that "key" it updates automaticly..

Are you stupid? The function gets client data via the server, so the server can handle the data it is given. The example is clearly used only as a demonstration to show how the functions work.

EDIT: Didn't see the page #.

Finn
29/07/2011, 02:28 PM
I think Gh0sT wants to have the values separated in their own variables, it's not too hard to split with sscanf:

testfuncyeah()
{
new netstats_str[2048+1];
GetNetworkStats(netstats_str, 2048);

/* print the stats */
print(netstats_str);

new sendbuffer = -1,
messagessent = -1,
bytessent = -1,
ackssent = -1,
acksinbuffer = -1,
messageswaiting = -1,
messagesresent = -1,
bytesresent = -1,
messagesreceived = -1,
bytesreceived = -1,
acksreceived = -1,
duplicateacks = -1,
Float:instkbitspersec = -1.0,
Float:sentkbitspersec = -1.0,
Float:receivedkbitspersec = -1.0;

sscanf(netstats_str, "p<:>{s[32]}i{s[32]}i{s[32]}i{s[32]}i{s[32]}i{s[32]}i{s[32]}i{s[32]}i{s[32]}'%'{s[32]}i{s[32]}i{s[32]}i{s[32]}i{s[32]}f{s[32]}f{s[32]}f",
sendbuffer, messagessent, bytessent, ackssent, acksinbuffer, messageswaiting,
messagesresent, bytesresent, messagesreceived, bytesreceived,
acksreceived, duplicateacks, instkbitspersec, sentkbitspersec, receivedkbitspersec);

/*print some of the variables to see if they're correct*/
printf("receivedkbitspersec %f", receivedkbitspersec);
printf("messagessent %d", messagessent);
printf("bytesreceived %d", bytesreceived);
return 1;
}


It doesn't include packet loss, because sscanf didn't like the '%' mark in between the text and it fucked the whole thing up, so I just skipped the packet loss line cuz I cba to think too much right now for such a meaningless thing for me.

It's not the most efficient method to split up the string, but it's just to show that with a little thinking you can use the function exactly like Gh0sT wants.

Mike Garber
29/07/2011, 03:41 PM
It doesn't include packet loss, because sscanf didn't like the '%' mark in between the text and it fucked the whole thing up, so I just skipped the packet loss line cuz I cba to think too much right now for such a meaningless thing for me.

Packetloss is what causes lag, so it is most likely the most wanted value to retrieve.

Finn
29/07/2011, 04:04 PM
Packetloss is what causes lag, so it is most likely the most wanted value to retrieve.
Thank you for sharing this information with me.

Beanz
29/07/2011, 04:40 PM
Nice to see the updates being so quick, props to ya for it.

palesz_88
29/07/2011, 08:25 PM
I hope tomorrow we got a new update! :)

TheStudioSamp
29/07/2011, 08:52 PM
stock PanelUpdate(playerid)
{
new paneldrawstr[256];
TextDrawShowForPlayer(playerid, PanelDraw_bg);

format(paneldrawstr, 256,"~w~Nick: ~r~~h~%s ~w~ID: ~r~~h~%d ~w~Respekt: ~r~~h~%d ~w~Ratio: ~r~~h~%.2f",
PI[playerid][pName], playerid, GetPlayerRespekt(playerid), PI[playerid][pKills] / (PI[playerid][pDeads] + PI[playerid][pKills]));

TextDrawSetString(PanelDraw[playerid], paneldrawstr);
TextDrawShowForPlayer(playerid, PanelDraw[playerid]);
return 1;
}

In OnPlayerSpawn: PanelUpdate(playerid);

causes the crash and does not display TextDraw

dugi
29/07/2011, 08:57 PM
stock PanelUpdate(playerid)
{
new paneldrawstr[256];
TextDrawShowForPlayer(playerid, PanelDraw_bg);

format(paneldrawstr, 256,"~w~Nick: ~r~~h~%s ~w~ID: ~r~~h~%d ~w~Respekt: ~r~~h~%d ~w~Ratio: ~r~~h~%.2f",
PI[playerid][pName], playerid, GetPlayerRespekt(playerid), PI[playerid][pKills] / (PI[playerid][pDeads] + PI[playerid][pKills]));

TextDrawSetString(PanelDraw[playerid], paneldrawstr);
TextDrawShowForPlayer(playerid, PanelDraw[playerid]);
return 1;
}

In OnPlayerSpawn: PanelUpdate(playerid);

causes the crash and does not display TextDraw

Is this a new problem present in R5? Or did it exist in R2 also?

TheStudioSamp
29/07/2011, 09:08 PM
I do not know, tested it on the R5

kacper55331
29/07/2011, 09:09 PM
You could enlarge the limit of '~color~' in textdraw's? After about 15 client gets crash.

Sorry for my language.

Donya
29/07/2011, 09:19 PM
You could enlarge the limit of '~color~' in textdraw's? After about 15 client gets crash.

Sorry for my language.

I don't think this is true, you can use as many colours as you want in a textdraw once the string limit does not hit over 256

Once you use ONE colour, the string limit is 256 otherwise if no colours are used, the string limit is 1024 s:

kacper55331
29/07/2011, 09:24 PM
I made once textdraw, which were collected data from MySQL.
After 7 records (and colors) was getting just crash.
When I deleted the colors there have up to 12

TheStudioSamp
29/07/2011, 09:38 PM
It's not because of the number of colors. I have textdraw, which has about 30 characters and each letter has a different color, it works normally.

As if what, apologized for my poor english.

FANEX
29/07/2011, 09:40 PM
I hope tomorrow we got a new update! :)
I hope no! It's f-king enough man :(. Too much updates... I know it's good, but when you do an update, do it for a while and give as a lot of new possibilities, not just fixing some bugs and release it(ok, fix bugs but add news, otherwise...).
So, every people must change their "executables" every day?
I hope SA-MP Team will make a stable version that will resist a couple of months, like previous version: 0.3c R2-2
However, I don't want to offend Kalcor, I love what he does!

kacper55331
29/07/2011, 09:42 PM
I tried with this code:
public ShowPlayerItems(playerid, page)
{
if(page == -10) return CallLocalFunction("ShowPlayerItems", "dd", playerid, 0) & GameTextForPlayer(playerid, "~r~~<~Don't find a page", 3000, 3);
new list_item[356];
new str[126];
new zmienna = 0;
format(str, 356, "SELECT `iUid` FROM `1items` WHERE `iBelongTo`=0 AND `iPlace`=1 AND `iOwner`=%d LIMIT %d, 10", PlayerInfo[playerid][player_uid], page);
mysql_query(str);
mysql_store_result();
if(!mysql_num_rows()) return GameTextForPlayer(playerid, "~r~Don't find a page~>~", 3000, 3) & mysql_free_result();
while(mysql_fetch_row_format(str, "|"))
{
new i = strval(str);
zmienna++;
Przedmiot[playerid][zmienna] = i;
if(ItemData[i][iType] == ITEM_WEAPON) format(list_item, sizeof(list_item), "%s~p~%d %s- %s (%d ammo)~n~", list_item, zmienna, UseItem(i), ItemData[i][iName], ItemData[i][iValue2]);
else if(ItemData[i][iType] == ITEM_PHONE) format(list_item, sizeof(list_item), "%s~p~%d %s- %s (%d)~n~", list_item, zmienna, UseItem(i), ItemData[i][iName], ItemData[i][iValue1]);
else format(list_item, sizeof(list_item), "%s~p~%d %s- %s~n~", list_item, zmienna, UseItem(i), ItemData[i][iName]);
}
mysql_free_result();
TextDrawSetString(przed[playerid], list_item);
TextDrawShowForPlayer(playerid, przed[playerid]);
TextDrawShowForPlayer(playerid, p2);
TextDrawShowForPlayer(playerid, p4);
SetPVarInt(playerid, "TD", 1);
SetPVarInt(playerid, "td-page", page);
return 1;
}It's old script.
Do not look for alignment/optimality.

[GF]Sasino97
29/07/2011, 09:55 PM
With the update, my /v or /veh command doesn't work anymore.
It says:

SERVER: Unknown Command.

but at the end there isn't return 0; at the end of OnPlayerCommandText there is return SendClientMessage(playerid, COLOR_RED, "Unknown Command");

HadanShip
29/07/2011, 10:17 PM
Hello, I use rp vortex, there is a serious problem when used with this version, the problem is not whether it will be all but bugue users, for example /goto 33 and takes you to id 0, also using /check 22 and you check out the id 0

use mysql and windows, not tested on linux.

dugi
29/07/2011, 10:21 PM
Hello, I use rp vortex, there is a serious problem when used with this version, the problem is not whether it will be all but bugue users, for example /goto 33 and takes you to id 0, also using /check 22 and you check out the id 0

use mysql and windows, not tested on linux.

This is caused by the sscanf plugin not working properly on the latest server update, you need to use R2 for now and wait for Y_Less to update his plugin.

Danis90
29/07/2011, 11:11 PM
Great update, very good

TPD
30/07/2011, 01:16 AM
Don't think I've seen so many updates at once. Great work!

Gamer_Z
30/07/2011, 03:01 AM
This is caused by the sscanf plugin not working properly on the latest server update, you need to use R2 for now and wait for Y_Less to update his plugin.

Or Wait till i know how to get, edit and set the offsets..
I already said it, this is a community, not a show off forum where only owners update their plugins, people should contribute code too if they can.

FANEX
30/07/2011, 06:04 AM
Or Wait till i know how to get, edit and set the offsets..
I already said it, this is a community, not a show off forum where only owners update their plugins, people should contribute code too if they can.

+1. I agree with you man!
That's what I like, people must update their plugins by their own knowledge. But who have guarantee that they know what they do? It's a risk ;D

TheStudioSamp
30/07/2011, 04:38 PM
new Float:ratio = 120 / (60 + 120);
printf("%0.2f", ratio);

Tested in Windows.

Should be 0.66 and 0.00 show in console.

dugi
30/07/2011, 05:28 PM
new Float:ratio = 120 / (60 + 120);
printf("%0.2f", ratio);

Tested in Windows.

Should be 0.66 and 0.00 show in console.

There is nothing wrong with that, you need to use floatdiv. See http://forum.sa-mp.com/showthread.php?p=1318725#post1318725 for more information.

Luis-
30/07/2011, 07:01 PM
Thanks for this, much appreciated.

BeckzyBoi
30/07/2011, 11:35 PM
new Float:ratio = 120 / (60 + 120);
printf("%0.2f", ratio);

Tested in Windows.

Should be 0.66 and 0.00 show in console.

...


new Float:ratio = 120.0 / (60.0 + 120.0);
printf("%0.2f", ratio);

T-N-Z
31/07/2011, 07:47 AM
Can someone tell me if there's any solution to fix the bug, where you push car into the water and vehicle won't respawn anymore. I tried using OnVehicleDeath but it only works when someone is driving that car only. Is there anything like GetVehicleState or something?

Johann95
31/07/2011, 05:06 PM
Very Very Good

Thanks Kalcor for This Update :)

Greetings from Foxy

Lightning[SV]
31/07/2011, 06:18 PM
Thanks for the update, great work.

Dark_Children
01/08/2011, 02:10 AM
Thanks job

Rocketeer
01/08/2011, 02:56 AM
Lol at comment above

btw, thank you kalkor.

[J]ulian
01/08/2011, 04:42 AM
Great Job!

Wiki-Error: http://wiki.sa-mp.com/wiki/GetVehicleDistanceFromPoint . The example of players.

MrDeath537
01/08/2011, 07:51 AM
Nice work Kalcor, I got some useful things from this update, especially the not occupied vehicle update.
Thanks.

kLx
01/08/2011, 11:42 AM
We wait a year, a ba bam - few new server side functions. NICE JOB KALCOR AS ALWAYS ..NOT

Calgon
01/08/2011, 12:09 PM
ulian;1321745']Great Job!

Wiki-Error: http://wiki.sa-mp.com/wiki/GetVehicleDistanceFromPoint . The example of players.

Nope, it was corrected on the 28th.

JernejL
01/08/2011, 02:48 PM
Please note:

GetPlayerNetworkStats does NOT always return proper data when used in onplayerdisconnect.

GetPlayerNetworkStats data within onplayerdisconnect is only be correct, when the player was kicked or timed out, if player uses /q the data returned is wrong.

SchurmanCQC
01/08/2011, 03:21 PM
Please note:

GetPlayerNetworkStats does NOT always return proper data when used in onplayerdisconnect.

GetPlayerNetworkStats data within onplayerdisconnect is only be correct, when the player was kicked or timed out, if player uses /q the data returned is wrong.

Well, yeah, but I don't see anyone wanting to get a player's network stats when they do '/q,' but I would probably want to do that if a player timed out.

Dark_Alien
01/08/2011, 07:52 PM
Where can I download samp R3 0.3c-1??

Blokkmonsta
01/08/2011, 08:29 PM
Where can I download samp R3 0.3c-1??

http://files.sa-mp.com

Jochemd
02/08/2011, 06:22 PM
A update after a lot of time, thanks, SA-MP team!

JonathanFeitosa
02/08/2011, 06:53 PM
Why the "undefined" in all the functions mentioned above? ( Samp Server R5 ) ?

GetNetworkStats
GetPlayerNetworkStats
GetPlayerCameraMode
GetPlayerDistanceFromPoint
GetVehicleDistanceFromPoint
GetPlayerSurfingObjectID

Calgon
02/08/2011, 06:55 PM
You need the 0.3c R5 includes, you're probably using the set of includes from 0.3 R2.

Finn
02/08/2011, 06:55 PM
Why the "undefined" in all the functions mentioned above? ( Samp Server R5 ) ?

GetNetworkStats
GetPlayerNetworkStats
GetPlayerCameraMode
GetPlayerDistanceFromPoint
GetVehicleDistanceFromPoint
GetPlayerSurfingObjectID
You have to download the update before the functions start working.

JonathanFeitosa
02/08/2011, 07:01 PM
I am very grateful, but I know the reason, I downloaded, my More Ta Compiler Compiling my old folder that I used. Know how to change it?

[HLF]Southclaw
02/08/2011, 07:04 PM
Just copy the includes into the folder it compiles in.
Unless you want to keep the old version [for some odd reason]

No need for a new folder, but if you really want to be awkward I'll explain how to change the directory of what Pawno program you open .pwn files with.

JonathanFeitosa
02/08/2011, 07:07 PM
No need, I want Thanks Lets Keep More.

array13
02/08/2011, 07:08 PM
but 0.3c-R5 is already stable?

BeckzyBoi
02/08/2011, 07:32 PM
but 0.3c-R5 is already stable?

It hasn't been added to the download list at sa-mp.com so I am guessing it is still being tested.

array13
02/08/2011, 07:51 PM
ok thx.

JonathanFeitosa
02/08/2011, 08:11 PM
What exactly does GetPlayerCameraMode Function?

When I tried I got nowhere ...

Kar
02/08/2011, 08:13 PM
What exactly does GetPlayerCameraMode Function?

When I tried I got nowhere ...

It returns the id of your current camera state I guess..

Great update!

Calgon
02/08/2011, 08:14 PM
What exactly does GetPlayerCameraMode Function?

When I tried I got nowhere ...

Read the wiki next time... http://wiki.sa-mp.com/wiki/GetPlayerCameraMode

JonathanFeitosa
02/08/2011, 08:22 PM
Appears: "Your camera mode is: "

Nothing appears.

Calgon
02/08/2011, 08:31 PM
Someone reported that bug a while ago, but it wasn't proven. Make sure you're running the R5 server, and not just using the includes for it.

Pedro_Doc
02/08/2011, 11:41 PM
WTF? Exitst 0.3c R7?
http://pawnoscripting.com/foro/viewtopic.php?f=117&t=11665

Calgon
02/08/2011, 11:50 PM
What sort of poorly thought out ruse is that, Pedro_Doc?

Donya
02/08/2011, 11:52 PM
WTF? Exitst 0.3c R7?
http://pawnoscripting.com/foro/viewtopic.php?f=117&t=11665

Those are the release candidates.

Mean
03/08/2011, 12:40 AM
WTF? Exitst 0.3c R7?
http://pawnoscripting.com/foro/viewtopic.php?f=117&t=11665No, R7 is still not out there if I recall.

Also this webpage is a fail, it should be PAWNscripting.com, not PAWNO. PAWNO and PAWN are two different things.

Calgon
03/08/2011, 12:42 AM
No, R7 is still not out there if I recall.

Also this webpage is a fail, it should be PAWNscripting.com, not PAWNO. PAWNO and PAWN are two different things.

Web page != Website domain.

Inverse
03/08/2011, 04:52 AM
The new callbacks and natives are awesome.

Riddick94
03/08/2011, 11:25 AM
Awesome job Kalcor! but i have suggestion for you (i hope it'll be not deleted :>) is this possibly for you make:
native TextDrawFadeInOut(Text:text, fade, time); ? i know it's scriptable because i have scripted it already but it's not the same like it is in Single Player. Can you make this as function? please :)

DaKill
03/08/2011, 12:06 PM
WTF? Exitst 0.3c R7?
http://pawnoscripting.com/foro/viewtopic.php?f=117&t=11665
This is RC7 (testing release), not R7. :D

davve95
03/08/2011, 03:13 PM
Where can I find the update (Not to servers) ??

Calgon
03/08/2011, 03:14 PM
Where can I find the update (Not to servers) ??

There's no client update, this is only a server update...

JonathanFeitosa
03/08/2011, 07:06 PM
GetPlayerSurfingObjectID is OnUnoccupiedVehicleUpdate How does it work?

I tested GetPlayerSurfingObjectID is turned up nothing.

[HLF]Southclaw
04/08/2011, 12:31 AM
Were you surfing a moving object by any chance?