[Helpful!] Some notes about 0.3
#1

The following is a quick list of what you will likely need to do to get your script to work with 0.3 fully.

SetDisabledWeapons - REMOVED. This function no longer exists, so don't use it - Use OnPlayerUpdate to check for weapon
EnableTirePopping - REMOVED. This function no longer exists. It is now ON at all times.
OnPlayerPrivmsg - REMOVED. This function no longer exists, as well as it's team variant (See below)
The following default commands are removed; /tpm /pm. Check the base.pwn in /filterscripts/ for a replacement /pm command.

If you lock vehicles;
You will need to re-apply locks at OnVehicleStreamIn, for example, see: http://pastebin.com/f54879d35
Full locking script by kc here: http://pastie.org/602932 (It's also on reply #6 of this thread)

If you attach objects to players;
You will need to re-apply the attachment at OnPlayerStreamIn. Example: http://pawn.pastebin.com/f71c9c389 (untested, by lavamike, may work)

If you wish to enable a shop, even when enter/exits are disabled, then you can use SetPlayerShopName(playerid,shop); to load the details for that area. This does NOT work for casinos. See: https://sampwiki.blast.hk/wiki/SetPlayerShopName

The Area 51 block objects are removed (the jet pack roof vent, and the little vent to the side of the entrance), to replace them as they where before, use;
Код:
	CreateObject(3095,268.94,1884.14,16.06,0.00,0.00,0.00); // JetPack room block
	CreateObject(3117,245.952,1862.810,19.49,0.0,0.0,-140.998); // Vent Block
If you use G-sTyLeZzZ MySQL plugin, it doesn't work on 0.3, however the fixed version is available here;
http://forum.sa-mp.com/index.php?topic=79352.0


AllowPlayerTeleport only works if AllowAdminTeleport is also enabled.

To fully repair a vehicle, use RepairVehicle(); - This also repairs any damage, as well as fixes smoke.

Callbacks for NPCs have NPC variants of callbacks, such as OnNPCExitVehicle, or OnNPCConnect.

Full info on 0.3s limits are here: https://sampwiki.blast.hk/wiki/Limits

For NPC info, and how to create them properly, see this thread by kc: http://forum.sa-mp.com/index.php?topic=119947.0

Traffic lights ARE synced, but currently over time they form a slightly lag and de-sync in time. Kye has stated this will be fixed in future versions.

Remember to replace the new includes with the old SA:MP ones. (Backup the old ones, unless you're not going to update your old script for 0.2 anymore)

When using trains, CreateVehicle may not work, use AddStaticVehicle(Ex)

This scripting release has a max players of 16. The full has 500.

If you wish to edit the rate of which objects and vehicles are streamed, see server.cfg. The max is 500. (default is 400)

The below is a list of releases on this forum which apparantly cause issues on the current scripting release;


Seif Vehicles (seif_vehicles.inc) (See: http://forum.sa-mp.com/index.php?topic=119949.0) - Fixed
Reply
#2

Quote:
Originally Posted by Redirect Left
If you lock vehicles;
You will need to re-apply locks at OnVehicleStreamIn, for example, see: http://pastebin.com/f5ca5b22b
Must every vehicle locked on this way? So every vehicle owner ship - script has to be updated, right?
Reply
#3

Quote:
Originally Posted by Stas92
Quote:
Originally Posted by Redirect Left
If you lock vehicles;
You will need to re-apply locks at OnVehicleStreamIn, for example, see: http://pastebin.com/f5ca5b22b
Must every vehicle locked on this way? So every vehicle owner ship - script has to be updated, right?
Correct, or at least, all scripts that lock their vehicles.
I will try figuring out if there is any simpler way for you.
Reply
#4

This would be very helpful, thanks
Reply
#5

Updated with some patched MySQL plugin fix links, and some more info on adjusting your script for 0.3
Reply
#6

Quote:
Originally Posted by Redirect Left
If you attach objects to players;
You will need to re-apply the attachment at OnPlayerStreamIn. (I don't have an example yet, i'll link you one if someone does one)
It's a little lengthy, and it's untested, but I guess it should work. If not someone else can fix it...


http://pastebay.com/51295
Reply
#7

http://pastie.org/602932

Lock and unlock script.

Adds function SetVehicleParamsForPlayerEx(vehicleid,playerid,obj ective,doorslocked) that works exactly the same as the default version, but removes the need to re-do any SetVehicleParamsForPlayer calls in OnVehicleStreamIn, as this does it all for you!
Reply
#8

Is 0.3 released or something?.. I ain't updated , 8 hours a day of school..
Reply
#9

Quote:
Originally Posted by MenaceX^
Is 0.3 released or something?.. I ain't updated , 8 hours a day of school..
http://forum.sa-mp.com/index.php?topic=119892.0
Reply
#10

Yeah thanks paid attention, though it would be nice to get more mirrors because the current one is doing problems for me.
Reply
#11

Quote:
Originally Posted by stepmex
What for a variable "sleep" in varlist?
sleep is a function for main().
Quote:
Originally Posted by » Pawnst★r «
Quote:
Originally Posted by kc
http://pastie.org/602932

Lock and unlock script.

Adds function SetVehicleParamsForPlayerEx(vehicleid,playerid,obj ective,doorslocked) that works exactly the same as the default version, but removes the need to re-do any SetVehicleParamsForPlayer calls in OnVehicleStreamIn, as this does it all for you!
Why does this make my amx look like it's ate twinkies non-stop for two years?
Arrays sizes changed?..
Reply
#12

Quote:
Originally Posted by MenaceX^
Quote:
Originally Posted by stepmex
What for a variable "sleep" in varlist?
sleep is a function for main().
Quote:
Originally Posted by » Pawnst★r «
Quote:
Originally Posted by kc
http://pastie.org/602932

Lock and unlock script.

Adds function SetVehicleParamsForPlayerEx(vehicleid,playerid,obj ective,doorslocked) that works exactly the same as the default version, but removes the need to re-do any SetVehicleParamsForPlayer calls in OnVehicleStreamIn, as this does it all for you!
Why does this make my amx look like it's ate twinkies non-stop for two years?
Arrays sizes changed?..
No ... I just added it ... changed a conflicting variable (Vehicle[2000] to Vehiclestr[2000]) and compiled, etc. and it went from 600+ kb to 6000+ ...
Reply
#13

Quote:
Originally Posted by RoamPT
Too late:

Quote:
Originally Posted by Stas92
EDIT: Problem fixxed. Note: When your server using a password the bots won't join!
a) This is not that topic
b) And in fact That guy was late

Quote:
Originally Posted by Whiteagle
Ok i was going crazy...

I spent all night trying to get an NPC online.

Finally i've discovered that when the server has a password the bots dont connect, didnt knew this and founded out by mistake, i thinked it was my code....

So here's the tip in case someone is as crazy as me...
Reply
#14

Quote:
Originally Posted by » Pawnst★r «
Quote:
Originally Posted by kc
http://pastie.org/602932

Lock and unlock script.

Adds function SetVehicleParamsForPlayerEx(vehicleid,playerid,obj ective,doorslocked) that works exactly the same as the default version, but removes the need to re-do any SetVehicleParamsForPlayer calls in OnVehicleStreamIn, as this does it all for you!
Why does this make my amx look like it's ate twinkies non-stop for two years?
Simply because 2000 * 500 = a lot of cells.

Do like I did in the example and redefine MAX_PLAYERS to your actual max players.
Reply
#15

It's worse than that. The code, for no apparent reason, redefines MAX_PLAYERS as 100, despite the fact that MAX_PLAYERS is currently 16. It then creates an array 2000*100*2*4 bytes big, i.e. 1600000 bytes (1562.5 kb, 1.5Mb). That's where all the extra data is coming from - and it's not needed at all:

http://forum.sa-mp.com/index.php?top...post_reduction

When 0.3 is released, assuming 2000 vehicles and 500 players, as it is that code will be 10000000 bytes (9.5Mb). Using the information in that link you could reduce it to 62500 cells or 250000 bytes - that's less than a quarter of an Mb, less than a sixth of the space taken up by the current code, and with 5 times more players than the current code:

pawn Code:
new gVehicleData[MAX_PLAYERS][Bit_Bits(MAX_VEHICLES * 2)];
Reply
#16


Defined [MAX_PLAYERS] down to 32 players for now.
Reply
#17

The OnPlayerStreamIn code I wrote linked on pastebay got deleted somehow but thankfully I had it saved in NotePad

http://pawn.pastebin.com/f14ba8a2a


EDIT: http://pawn.pastebin.com/f71c9c389

That link should work now, still untested but I originally forgot the 'public' in front of the public's :P
Reply
#18

A macro for PlayerToPoint users which want to use the new IsPlayerInRangeOfPoint function.

pawn Code:
#define PlayerToPoint(%1,%2,%3,%4,%5) \
 IsPlayerInRangeOfPoint(%2,%1,%3,%4,%5)
Someone could add it to Wiki, I've got no account there and no-one wants to create a one for me
Reply
#19

I do believe that a lot of the objects are gone.

For example, I believe that the big smokes crack factory object is gone.

I just checked and the ground over the spot in the San Fierro Construction site is still there.
Reply
#20

Quote:
Originally Posted by Seif_ [adream-rp.com
]
Quote:
Originally Posted by ssǝן‾ʎ
I'm not entirely sure why, but it seems that the messages when you use native functions incorrectly have been removed. For example:

0.2:

pawn Code:
IsPlayerConnected(0, 0);
Console:

Code:
SCRIPT: Bad parameter count (Count is 2, Should be 1):
0.3:

pawn Code:
IsPlayerConnected(0, 0);
Console doesn't display anything.
It was plain dull having the console printing out that message without telling you which function is not used properly.
To save time and more arguing, it's IsPlayerConnected(id) not IsPlayerConnected(id, id) - so use IsPlayerConnected(0).
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)