Balkan SA:MP

San Andreas Multiplayer - www.sa-mp.com => Uopšteno o SA-MPu => SA-MP novosti => Temu započeo: Correlli poslato Mart 24, 2010, 08:24:19 PRE PODNE

Naslov: Server update: 0.3a R8
Poruka od: Correlli poslato Mart 24, 2010, 08:24:19 PRE PODNE
Citat: Kye @forum.sa-mp.com
SA-MP 0.3a R8 Server

22/06/2010

- 0.3a R8 server fixes a denial of service attack where an external program interfacing with SA-MP's network layer could send a misaligned payload to RPCs.

Windows: http://files.sa-mp.com/samp03asvr_R8_win32.zip (http://files.sa-mp.com/samp03asvr_R8_win32.zip)
Linux: http://files.sa-mp.com/samp03asvr_R8.tar.gz (http://files.sa-mp.com/samp03asvr_R8.tar.gz)

SA-MP 0.3a R7 Server

28/03/2010

Windows: http://files.sa-mp.com/samp03asvr_R7_win32.zip (http://files.sa-mp.com/samp03asvr_R7_win32.zip)
Linux: http://files.sa-mp.com/samp03asvr_R7.tar.gz (http://files.sa-mp.com/samp03asvr_R7.tar.gz)

Changes from R6 server:

- There was a problem with the PVar list after DeletePVar() had been used (thanks to Toribio for pointing this out).
- PVar names use uppercase internally which speeds up the lookups. When you enumerate PVars the name will always be returned in uppercase. You can still use any case for getting/setting.

SA-MP 0.3a R6 Server

27/03/2010

Changes from R5 server:

- PVar names use exact names instead of partial matching, they're case-insensitive still ("id" is the same as "ID").
- PVars are now reset during a game mode restart.
- Hopefully fixed crash on Windows server related to a compiler problem.
- Vehicle mods sent by players have additional sanity checks (thanks to Tenshi for pointing out a problem).

SA-MP 0.3a R5 Server

23/03/2010

A new server update is being made available immediately due to a "denial of service" attack on several popular SA-MP servers.

Note: this is not 0.3b. This is an optional server-only update. It does not fix all existing bugs, as many fixes will have to wait until the next mandatory client/server update.

0.3a R5 fixes a "denial of service" vulnerability where a player sending invalid data, generated by an external program, may cause the server to generate a debug assertion, which causes the server to close.

The R5 server also contains some new scripting features that missed the initial 0.3a server releases.

Camera information:

With the camera information you can tell where a player is looking. Please note the player's camera info is only updated while they are onfoot, spectating or driving a vehicle which has a special turret like the firetruck/swatvan etc.


native GetPlayerWeaponState(playerid);
native GetPlayerCameraPos(playerid, &Float:x, &Float:y, &Float:z);
native GetPlayerCameraFrontVector(playerid, &Float:x, &Float:y, &Float:z);
native GetPlayerCameraUpVector(playerid, &Float:x, &Float:y, &Float:z);


Per-player variable system: (PVars).

Originally SA-MP was only designed for 100 maximum players. This meant defining arrays in pawn of MAX_PLAYERS size such as: PlayerInfo[MAX_PLAYERS] was generally okay. Now that MAX_PLAYERS is defined as 500, script writers are finding themselves creating arrays with 500 elements just to store a single flag. This can turn out to be very wasteful in terms of memory use. These variables also need to be manually reset when the player using them leaves the server.

Advantages of using PVars over arrays of MAX_PLAYERS:
1) PVars can be shared/accessed across gamemode scripts and filterscripts, making it easier to modularise your code.
2) PVars are automatically deleted when a player leaves the server, meaning you don't have to manually reset variables for the next player who joins.
3) No real need for complex enums/player info structures.
4) Saves memory by not allocating pawn array elements for playerids which will probably never be used.
5) You can easily enumerate and print/store the PVar list. This makes both debugging and player info storage easier.
6) Even if a PVar hasn't been created, it still will return a default value of 0.
7) PVars can hold very large strings using dynamically allocated memory.


// Per-player variable system (PVars)
native SetPVarInt(playerid, varname[], int_value);
native GetPVarInt(playerid, varname[]);
native SetPVarString(playerid, varname[], string_value[]);
native GetPVarString(playerid, varname[], string_return[], len);
native SetPVarFloat(playerid, varname[], Float:float_value);
native Float:GetPVarFloat(playerid, varname[]);
native DeletePVar(playerid, varname[]);

// PVar enumeration
#define PLAYER_VARTYPE_NONE 0
#define PLAYER_VARTYPE_INT 1
#define PLAYER_VARTYPE_STRING 2
#define PLAYER_VARTYPE_FLOAT 3

native GetPVarsUpperIndex(playerid);
native GetPVarNameAtIndex(playerid, index, ret_varname[], ret_len);
native GetPVarType(playerid, varname[]);


Addition to player markers:

If the player markers mode is PLAYER_MARKERS_MODE_GLOBAL, you can limit the radius which the player markers are drawn for each player. This may be important on some servers since there are limits to how many total markers you can have in GTA SA.


native LimitPlayerMarkerRadius(Float:marker_radius);


Additional vehicle damage functions:

Vehicle damage callback is called when a player updates the damage information on their vehicle.
New functions allow you to get and set the vehicle damage information.


forward OnVehicleDamageStatusUpdate(vehicleid, playerid);
native GetVehicleDamageStatus(vehicleid, &panels, &doors, &lights, &tires);
native UpdateVehicleDamageStatus(vehicleid, panels, doors, lights, tires);


Other:

Fix for pawn's fseek() function.
Citat: Kye poslato Mart 24, 2010, 02:25:51 PRE PODNE
Some handy utils functions for dealing with lists of PVars:

//-------------------------------------------
// Sends a list of all PVars to the player as
// client messages.

SendPVarListToPlayer(playerid)
{
   new ubound = GetPVarsUpperIndex(playerid);
new x=0;
new name[40+1];
new line[128+1];

   SendClientMessage(playerid,0xF000F0F0, "---Player Vars List---");
while(x != ubound) {
if(GetPVarNameAtIndex(playerid,x,name,40)) {
if(Util_GetPVarEntryAsString(playerid,name,line,128)) {
                SendClientMessage(playerid,0xFFFFFFFF,line);
}
}
x++;
}
}

//-------------------------------------------
// return PVar entry as 'name'='value' string

stock Util_GetPVarEntryAsString(playerid, name[], ret[], len)
{
new Float:fValue;
new iValue;
new szStrValue[1024+1]; // this might require greater size if you store large strings in PVars
new type;
   ret[0] = EOS;

  type = GetPVarType(playerid, name);
if(type != PLAYER_VARTYPE_NONE) {
switch(type)
{
case PLAYER_VARTYPE_STRING:
{
GetPVarString(playerid,name,szStrValue,1024);
format(ret,len,"%s=%s",name,szStrValue);
}
case PLAYER_VARTYPE_INT:
{
iValue = GetPVarInt(playerid,name);
format(ret,len,"%s=%d",name,iValue);
}
case PLAYER_VARTYPE_FLOAT:
{
   fValue = GetPVarFloat(playerid,name);
format(ret,len,"%s=%f",name,fValue);
}
}
return 1;
}
return 0;
}

//-------------------------------------------
// Fills the provided string with all the player's PVars
// seperated by the specified 'delimiter'

stock Util_CreatePVarList(playerid, retstr[], len, delimiter[])
{
if(!IsPlayerConnected(playerid)) return 0;

new x=0;
new remaining_string=len;
new line[2048+1];
new name[40+1];
retstr[0] = EOS;

new ubound = GetPVarsUpperIndex(playerid);

while(x != ubound) {
if(GetPVarNameAtIndex(playerid,x,name,40)) {
if(Util_GetPVarEntryAsString(playerid,name,line,2048)) {
// if there is enough space, concat this line to the return string
if(remaining_string > (strlen(line) + strlen(delimiter))) {
    strcat(retstr,line);
    strcat(retstr,delimiter);
remaining_string -= (strlen(line) + strlen(delimiter));
}
}
}
x++;
}

return 1;
}

//-------------------------------------------
Link na SA:MP forumu (http://forum.sa-mp.com/index.php?topic=161491.0)

Nije mi se dalo prevodit jer imam puno obaveza sada.

Pozdrav,
  Correlli
Naslov: Odg: Server update: 0.3a R5
Poruka od: nastoe poslato Mart 24, 2010, 11:38:50 PRE PODNE
Odlicni update, bas me zanima idem probati odma :)
Naslov: Odg: Server update: 0.3a R5
Poruka od: [CH] ♫◄[Sam]►♫ poslato Mart 24, 2010, 11:46:45 PRE PODNE
forward OnVehicleDamageStatusUpdate(vehicleid, playerid);
native GetVehicleDamageStatus(vehicleid, &panels, &doors, &lights, &tires);
native UpdateVehicleDamageStatus(vehicleid, panels, doors, lights, tires);

ovo otvara puno vise mogucnosti...
Naslov: Odg: Server update: 0.3a R5
Poruka od: nastoe poslato Mart 24, 2010, 11:48:12 PRE PODNE
Citat: Sam poslato Mart 24, 2010, 11:46:45 PRE PODNE
forward OnVehicleDamageStatusUpdate(vehicleid, playerid);
native GetVehicleDamageStatus(vehicleid, &panels, &doors, &lights, &tires);
native UpdateVehicleDamageStatus(vehicleid, panels, doors, lights, tires);

ovo otvara puno vise mogucnosti...
ahaa, jedva cekam kada ce ju staviti nova zvanja to su vam oni (public) < ako ce ju stavljati :D
Naslov: Odg: Server update: 0.3a R5
Poruka od: JoeBullet v2.1 poslato Mart 24, 2010, 13:16:47 POSLE PODNE
aj napokon nesto novo  8)
Naslov: Odg: Server update: 0.3a R5
Poruka od: Correlli poslato Mart 24, 2010, 14:22:08 POSLE PODNE
pVarijablovi će biti korisni, a i nove funkcije za vozila:
SA-MP - Spike Strip :D (http://www.youtube.com/watch?v=0HlludTwM7E#)
Naslov: Odg: Server update: 0.3a R5
Poruka od: [ED] ZicMortal poslato Mart 24, 2010, 14:26:46 POSLE PODNE
Ja sam svoj gamemode vec prebacio na R5 i cini mi se puno bolje (vise funkcija).
Naslov: Odg: Server update: 0.3a R5
Poruka od: JoeBullet v2.1 poslato Mart 24, 2010, 14:38:24 POSLE PODNE
a i napokon je moguce promijeniti stanje svijetla tj. moci ce se upalit/ugasit svijetla po zelji  8)
Naslov: Odg: Server update: 0.3a R5
Poruka od: John poslato Mart 24, 2010, 15:05:39 POSLE PODNE
gume isto vrata isto  :)
Naslov: Odg: Server update: 0.3a R5
Poruka od: Chris poslato Mart 24, 2010, 18:31:11 POSLE PODNE
Citat: Samparena~Tinu_Tuna poslato Mart 24, 2010, 17:20:27 POSLE PODNE
Konacno nesto dodato bice dobro policiji da radi to sa onim sto busi gume i za svijetla ce bit dobro , svaka cast dobro ce bit igrat na stunt i rp serverima

Ovo ce vise za rp servere bit, npr kad te policija lovi pa ti gume busi i ako nemas svijetla upaljena kazna itd...sve u svemu super!!!
Naslov: Odg: Server update: 0.3a R5
Poruka od: JoeBullet v2.1 poslato Mart 24, 2010, 19:41:33 POSLE PODNE
eto isprobah busenje guma i jedva cekam da dode na neki rp server pa vise nece biti prednosti ako je osumljiceni u npr. sultanu  :D
Naslov: Odg: Server update: 0.3a R5
Poruka od: קlเשค poslato Mart 25, 2010, 00:44:28 PRE PODNE
a joj pre dobro,bas me iznenadio update.I ove varijable nesto kao static
Naslov: Odg: Server update: 0.3a R5
Poruka od: Dr.Ivex → ♫ poslato Mart 25, 2010, 08:20:27 PRE PODNE
super je (tested)  ;D
Naslov: Odg: Server update: 0.3a R5
Poruka od: Parker poslato Mart 25, 2010, 10:03:12 PRE PODNE
Zmigavci su sada dostupni :)
Naslov: Odg: Server update: 0.3a R5
Poruka od: Correlli poslato Mart 25, 2010, 20:16:02 POSLE PODNE
Windows: http://files.sa-mp.com/samp03asvr_R5-2_win32.zip (http://files.sa-mp.com/samp03asvr_R5-2_win32.zip) (The Windows server was re-uploaded as R5-2 because of a bad compile. Please re-download.)
Naslov: Odg: Server update: 0.3a R5
Poruka od: Correlli poslato Mart 26, 2010, 23:31:39 POSLE PODNE
Uskoro će doći R6 verzija jer imaju pVarijablovi bug.
Naslov: Odg: Server update: 0.3a R5
Poruka od: nastoe poslato Mart 26, 2010, 23:37:22 POSLE PODNE
Citat: Don Correlli poslato Mart 26, 2010, 23:31:39 POSLE PODNE
Uskoro će doći R6 verzija jer imaju pVarijablovi bug.
Da bas sam cito sada  :( nadam se da ce uskoro doci
Naslov: Odg: Server update: 0.3a R5
Poruka od: Correlli poslato Mart 27, 2010, 11:06:02 PRE PODNE
Citat: Kye poslato Mart 24, 2010, 02:11:42 PRE PODNE
SA-MP 0.3a R6 Server

27/03/2010

Windows: http://files.sa-mp.com/samp03asvr_R6_win32.zip (http://files.sa-mp.com/samp03asvr_R6_win32.zip)
Linux: http://files.sa-mp.com/samp03asvr_R6.tar.gz (http://files.sa-mp.com/samp03asvr_R6.tar.gz)

Some problems with the 0.3a R5 server release are being addressed in 0.3a R6. The R5 server release was rushed out due to the fact that servers were being attacked.

Changes from R5 server:

- PVar names use exact names instead of partial matching, they're case-insensitive still ("id" is the same as "ID").
- PVars are now reset during a game mode restart.
- Hopefully fixed crash on Windows server related to a compiler problem.
- Vehicle mods sent by players have additional sanity checks (thanks to Tenshi for pointing out a problem).
Naslov: Odg: Server update: 0.3a R6
Poruka od: nastoe poslato Mart 27, 2010, 11:08:20 PRE PODNE
To je sada popravljena verzija?  :)
Naslov: Odg: Server update: 0.3a R6
Poruka od: Correlli poslato Mart 28, 2010, 11:28:11 PRE PODNE
Citat: Kye poslato Mart 24, 2010, 02:11:42 PRE PODNESA-MP 0.3a R7 Server

28/03/2010

Windows: http://files.sa-mp.com/samp03asvr_R7_win32.zip (http://files.sa-mp.com/samp03asvr_R7_win32.zip)
Linux: http://files.sa-mp.com/samp03asvr_R7.tar.gz (http://files.sa-mp.com/samp03asvr_R7.tar.gz)

Changes from R6 server:

- There was a problem with the PVar list after DeletePVar() had been used (thanks to Toribio for pointing this out).
- PVar names use uppercase internally which speeds up the lookups. When you enumerate PVars the name will always be returned in uppercase. You can still use any case for getting/setting.
Naslov: Odg: Server update: 0.3a R5
Poruka od: matemandbrnaze742 poslato Mart 28, 2010, 19:23:54 POSLE PODNE
Citat: Don Correlli poslato Mart 24, 2010, 14:22:08 POSLE PODNE
pVarijablovi će biti korisni, a i nove funkcije za vozila:
SA-MP - Spike Strip :D (http://www.youtube.com/watch?v=0HlludTwM7E#)

Zna li ko koji je ID od ovog objekta za busit gume
Naslov: Odg: Server update: 0.3a R7
Poruka od: D101h poslato Mart 28, 2010, 19:33:31 POSLE PODNE
Mislim da je to skup od 1593.
Naslov: Odg: Server update: 0.3a R7
Poruka od: [CM] BrunoHP poslato Mart 28, 2010, 20:04:17 POSLE PODNE
Hmm, imo je bug dakle da kadad salje poruku svima, vidjeti ce ih samo prvih 100 igraca. Kako lose :D
Naslov: Odg: Server update: 0.3a R7
Poruka od: Dr.Ivex → ♫ poslato Mart 28, 2010, 20:11:25 POSLE PODNE
hmm ja imam ove sad pikice

2892 - one malo duze !

2899 - one malo krace!
Naslov: Odg: Server update: 0.3a R8
Poruka od: Correlli poslato Jun 22, 2010, 12:09:50 POSLE PODNE
Citat: Kye @forum.sa-mp.comSA-MP 0.3a R8 Server

22/06/2010

- 0.3a R8 server fixes a denial of service attack where an external program interfacing with SA-MP's network layer could send a misaligned payload to RPCs.

Windows: http://files.sa-mp.com/samp03asvr_R8_win32.zip (http://files.sa-mp.com/samp03asvr_R8_win32.zip)
Linux: http://files.sa-mp.com/samp03asvr_R8.tar.gz (http://files.sa-mp.com/samp03asvr_R8.tar.gz)