Welcome, Guest
You have to register before you can post on our site.

Username
  

Password
  





Search Forums



(Advanced Search)

Forum Statistics
» Members: 5,706
» Latest member: r1zco
» Forum threads: 2,130
» Forum posts: 11,917

Full Statistics

Online Users
There are currently 87 online users.
» 2 Member(s) | 81 Guest(s)
Facebook, Bing, Google, Yandex, kmarco68, Politoxicomano

Latest Threads
Trunk open
Forum: Pawn Scripting
Last Post: Kriso37
2 hours ago
» Replies: 1
» Views: 7
Is it safe to get assignm...
Forum: Tech
Last Post: luchkabody
10 hours ago
» Replies: 1
» Views: 74
someone crashing my serve...
Forum: Programming
Last Post: itayuss
10 hours ago
» Replies: 1
» Views: 14
Client-side scripts
Forum: Questions and Suggestions
Last Post: loverrhoan85
Today, 06:01 AM
» Replies: 3
» Views: 717
helfen
Forum: Chat
Last Post: carlosgucci777
Today, 01:03 AM
» Replies: 1
» Views: 16
Malena Summer Mobile Nota...
Forum: General Discussions
Last Post: malenasummermobilenotary
Yesterday, 08:11 PM
» Replies: 0
» Views: 9
Caribbean Island Festival...
Forum: Chat
Last Post: caribbeanislandf
Yesterday, 05:23 PM
» Replies: 0
» Views: 5
Is this a silly question....
Forum: Questions and Suggestions
Last Post: KILLERDOG
Yesterday, 12:12 PM
» Replies: 0
» Views: 16
Discover
Forum: General Discussions
Last Post: fwjkgehwh
Yesterday, 06:52 AM
» Replies: 0
» Views: 9
What is the importance of...
Forum: General Discussions
Last Post: kettyperi89
Yesterday, 06:30 AM
» Replies: 0
» Views: 6

 
  PawnPlus
Posted by: IllidanS4 - 2019-04-14, 12:42 AM - Forum: Plugins - Replies (12)

What is this about?
PawnPlus is a multi-purpose plugin enhancing the capabilities of Pawn with features like asynchronous programming, dynamic containers and strings, threads, public and native functions hooks, and various other things.

Dynamic strings
Standard strings in Pawn are bound to an array allocated within the AMX. PawnPlus introduces dynamically allocated mutable strings which are not bound to any AMX instance, so they can be shared between scripts without copying, and offers a wide range of functions to manipulate them.

Using PawnPlus strings leads to better memory management (because you don't need to worry about the buffer size) and could increase the efficiency of some functions (because the length of the string is always known). PawnPlus strings can also store the null character without issues.

Moreover, any native function can be adapted to accept a dynamic string instead of a normal one. This transformation is very simple:

Code:
native SendClientMessageStr(playerid, color, AmxString:message) = SendClientMessage;

SendClientMessageStr(playerid, -1, str_new_static("Hello, id ")  str_val(playerid));

PawnPlus strings are garbage-collected, so you don't need to worry about their lifetime much.

Asynchronous programming
The usual way of handling events in Pawn is via a callback, even if the event is directly caused by the script. You may use inline functions from YSI, but the code is still scattered over multiple functions, despite the simple flow of actions.

In PawnPlus, you can represent an action that takes time using a task. In your code, you can call task_await which pauses the execution of the current functions (returning to the caller and not blocking the main thread) and resumes the code in the moment the task is completed.

A task can represent a MySQL query, the selection of an item from a dialog, a time interval or any time-based action you wish. You can create tasks, await them in one part of code and set the result in another, and the code resumes with the original variables preserved.

Code:
SendClientMessage(playerid, -1, "Loading...");
task_await(LoadPlayerAsync(playerid));
SendClientMessage(playerid, -1, "Loaded!");

task_await can be used on any task object, and if the task completes successfully, it returns the result. Tasks can also store AMX errors which you can use to signal exceptional results.

Dynamic containers
PawnPlus offers new efficient container types for use from Pawn: list (vector), linked list, and map. These containers can store values or arrays of any tag, which is stored together with the element as well. This allows for type-safe operations on these collections. You can even use strings as keys in a map.

Variant is another data type introduced in this plugin, which is used as the element type of dynamic collections. In containers, the variant has no identity (only value), but you can extract it from a collection without having to know its tag, and store it in another. Variants are also garbage collected.

All collections can be iterated using iterator objects. Iterators are objects pointing to a specific place in a collection, which can be used to access a single element in it, or to traverse the collection in a simple way. These iterators are safe to use even if the underlying collection is modified or deleted.

All collections are also available to be used as generic containers, restricting the type of values that are stored within. This feature is completely compile-time.

Tags
PawnPlus also extends the Pawn tag system with universally accessible tags, tag operations and tag inheritance. You can create a new dynamic tag, configure its operations, and set it as a tag of a variant, which allows you to call custom code when operations on the variant are performed. You can even override value copy and destruction, allowing you to introduce smart resource management.

Guards
Guards are special objects used to guard other values and destroy them when required. A guarded value will be destroyed when the context in which the guard was created terminates, freeing all resources that were associated with the value. You can set your own destructor via the tag system, and you'll never have to worry about freeing intermediate values ever again.

Threading
PawnPlus allows you to execute any piece of code in a new thread, parallel to the main one. Usually, the new thread will not allow other code to run in the same script (since AMX is not made for parallel execution), but together with forking, it is possible to clone the current script (preserving a specific selection of data) and execute a completely parallel code within it.

This can be combined with tasks to offload a time-consuming action to another thread, and provide a thread-safe method of retrieving the result.

Hooking
PawnPlus offers hooks of callbacks and native functions.

Any callback can be dynamically hooked with a new handler which is called when the original callback is called, and you can even modify the arguments or the return value. Combined with the task system, you can adapt any event-based code to task-based code with this approach.

Any native function can be hooked from your script, even affecting other scripts and plugins. Your code will be called every time when the original function is called, and you are free to modify the arguments or the return value in the same handler. You can even decide to hook a function only to modify some of its arguments and ignore the others, (via input filters), or to modify the return value only (via output filters).

Syntax shortcuts
Several functions can be used from new special pieces of syntax. For example, @ can be used as an alias for str_new_static, @@ can be used for str_val, await instead of task_await or yield instead of task_yield. New for loops are also provided for all collections, and there is special syntax for forked or threaded blocks.

All new syntax features are disabled by default because of to possible conflicts with other includes. You can enable them individually, or all of them by defining PP_SYNTAX.

Other stuff
You can obtain the list of all arguments given to the function, dynamically invoke natives or public functions, share variables in your script with other scripts, raise errors, catch errors, allocate memory on the heap, and fork the script (to protect its state from errors, for example, or to wait for a task locally without pausing the other code).


All these features are described in great detail on the GitHub wiki.


Brick [Map] [REL] Interior of driving school
Posted by: Mugsy - 2019-04-14, 12:36 AM - Forum: Filterscripts - Replies (8)




Credits: Breeze - Mugsy





Code:
//Mapeo por Breeze, videos de los mapeos en https://www.youtube.com/c/BreezeSAMP



CreateDynamicObject(19377, 2224.60059, -1935.23853, -12.58117, ? 0.00000, 90.00000, 0.00000);

CreateDynamicObject(19377, 2224.59863, -1925.60693, -8.94071, ? 0.00000, 90.00000, 0.00000);

CreateDynamicObject(19452, 2219.45190, -1925.59534, -10.74520, ? 0.00000, 0.00000, 0.00000);

CreateDynamicObject(19452, 2218.39136, -1929.64417, -10.74520, ? 0.00000, 0.00000, 90.00000);

CreateDynamicObject(19452, 2228.32373, -1921.89673, -10.74520, ? 0.00000, 0.00000, 0.00000);

CreateDynamicObject(19360, 2223.60449, -1926.62805, -10.74520, ? 0.00000, 0.00000, 90.00000);

CreateDynamicObject(2010, 2220.00415, -1929.23279, -12.49520, ? 0.00000, 0.00000, 0.00000);

CreateDynamicObject(19452, 2224.20801, -1920.93042, -10.74520, ? 0.00000, 0.00000, 90.00000);

CreateDynamicObject(19452, 2222.08643, -1918.69006, -10.74520, ? 0.00000, 0.00000, 0.00000);

CreateDynamicObject(19360, 2226.80615, -1926.62732, -10.74520, ? 0.00000, 0.00000, 90.00000);

CreateDynamicObject(19452, 2226.36572, -1931.39294, -10.74520, ? 0.00000, 0.00000, 0.00000);

CreateDynamicObject(19452, 2219.45142, -1935.22058, -10.74520, ? 0.00000, 0.00000, 0.00000);

CreateDynamicObject(19452, 2222.27222, -1939.56262, -10.74520, ? 0.00000, 0.00000, 90.00000);

CreateDynamicObject(19452, 2226.36719, -1941.02563, -10.74520, ? 0.00000, 0.00000, 0.00000);

CreateDynamicObject(1811, 2224.49170, -1931.01257, -11.88260, ? 0.00000, 0.00000, 90.00000);

CreateDynamicObject(1811, 2222.78369, -1931.02576, -11.88260, ? 0.00000, 0.00000, 90.00000);

CreateDynamicObject(1811, 2221.15039, -1931.02734, -11.88260, ? 0.00000, 0.00000, 90.00000);

CreateDynamicObject(1811, 2222.85010, -1935.21313, -11.88260, ? 0.00000, 0.00000, 90.00000);

CreateDynamicObject(1811, 2224.55811, -1935.19995, -11.88260, ? 0.00000, 0.00000, 90.00000);

CreateDynamicObject(1811, 2221.04297, -1935.20679, -11.88260, ? 0.00000, 0.00000, 90.00000);

CreateDynamicObject(1811, 2222.75098, -1933.30713, -11.88260, ? 0.00000, 0.00000, 90.00000);

CreateDynamicObject(1811, 2224.54297, -1933.27771, -11.88260, ? 0.00000, 0.00000, 90.00000);

CreateDynamicObject(1811, 2221.11865, -1933.28870, -11.88260, ? 0.00000, 0.00000, 90.00000);

CreateDynamicObject(2010, 2220.04199, -1930.19788, -12.49671, ? 0.00000, 0.00000, 0.00000);

CreateDynamicObject(2010, 2225.89917, -1927.24194, -12.49402, ? 0.00000, 0.00000, 0.00000);

CreateDynamicObject(19377, 2224.59863, -1925.60693, -12.58117, ? 0.00000, 90.00000, 0.00000);

CreateDynamicObject(19377, 2224.60059, -1935.23853, -8.94070, ? 0.00000, 90.00000, 0.00000);

CreateDynamicObject(19477, 2067.73877, -1917.29736, 12.55148, ? 0.00000, 0.00000, 0.00000);

CreateDynamicObject(1690, 2043.27966, -1916.48132, 19.50220, ? 0.00000, 0.00000, 0.00000);

CreateDynamicObject(2008, 2226.82300, -1922.64282, -12.51370, ? 0.00000, 0.00000, 180.00000);

CreateDynamicObject(1714, 2226.47778, -1921.71057, -12.49498, ? 0.00000, 0.00000, -11.28000);

CreateDynamicObject(2310, 2227.17847, -1924.02637, -12.01000, ? 0.00000, 0.72000, 284.35199);

CreateDynamicObject(2310, 2225.75098, -1923.95459, -12.01000, ? 0.00000, 0.00000, 249.53352);

CreateDynamicObject(2162, 2222.67676, -1921.01062, -12.49501, ? 0.00000, 0.00000, 0.00000);

CreateDynamicObject(2162, 2228.17822, -1921.57800, -12.49500, ? 0.00000, 0.00000, 270.00000);

CreateDynamicObject(2164, 2224.45117, -1921.03003, -12.49642, ? 0.00000, 0.00000, 0.00000);

CreateDynamicObject(2167, 2222.17676, -1922.44165, -12.49440, ? 0.00000, 0.00000, 90.00000);

CreateDynamicObject(19786, 2226.00757, -1926.56433, -10.48000, ? 0.00000, 0.00000, 180.00000);

CreateDynamicObject(1808, 2228.07593, -1924.61902, -12.49600, ? 0.00000, 0.00000, 270.00000);

CreateDynamicObject(2813, 2226.61475, -1922.71777, -11.70182, ? 0.00000, 0.00000, 0.00000);

CreateDynamicObject(1744, 2224.56592, -1939.63770, -11.45490, ? 0.00000, 0.00000, 180.00000);

CreateDynamicObject(1238, 2227.83447, -1926.07214, -11.85740, ? 0.00000, 0.00000, 9.78000);

CreateDynamicObject(1238, 2227.83447, -1926.07214, -12.18240, ? 0.00000, 0.00000, 0.00000);

CreateDynamicObject(1238, 2227.83447, -1926.07214, -12.05840, ? 0.00000, 0.00000, -5.70000);

CreateDynamicObject(1238, 2227.20850, -1926.30664, -12.18240, ? 0.00000, 0.00000, 315.46649);

CreateDynamicObject(1569, 2219.94897, -1921.02185, -12.49380, ? 0.00000, 0.00000, 0.00000);

CreateDynamicObject(19786, 2224.09741, -1939.55981, -10.48000, ? 0.00000, 0.00000, 180.00000);

CreateDynamicObject(1744, 2226.52979, -1926.69043, -11.45490, ? 0.00000, 0.00000, 180.00000);

CreateDynamicObject(2173, 2221.14502, -1937.49487, -12.49500, ? 0.00000, 0.00000, 0.00000);

CreateDynamicObject(1714, 2221.65454, -1938.89600, -12.49360, ? 0.00000, 0.00000, 180.00000);

CreateDynamicObject(2190, 2221.52734, -1937.13074, -11.69436, ? 0.00000, 0.00000, 0.00000);

CreateDynamicObject(2059, 2222.04321, -1937.27893, -11.68030, ? 0.00000, 0.00000, 0.00000);

CreateDynamicObject(2191, 2220.11426, -1938.52222, -12.49420, ? 0.00000, 0.00000, 90.00000);

CreateDynamicObject(19955, 2226.29761, -1936.29395, -12.82098, ? 0.00000, 0.00000, 270.00000);

CreateDynamicObject(19955, 2226.29565, -1937.76099, -14.14316, ? 0.00000, 0.00000, 270.00000);

CreateDynamicObject(19992, 2226.29639, -1936.52258, -13.87703, ? 0.00000, 0.00000, 270.00000);

CreateDynamicObject(19957, 2226.29736, -1937.05798, -12.57245, ? 0.00000, 0.00000, 270.00000);

CreateDynamicObject(19952, 2226.29297, -1935.19385, -12.49520, ? 0.00000, 0.00000, 270.00000);

CreateDynamicObject(19959, 2226.29468, -1935.38696, -13.99044, ? 0.00000, 0.00000, 270.00000);

CreateDynamicObject(19977, 2226.29443, -1938.31213, -12.98869, ? 0.00000, 0.00000, 270.00000);

CreateDynamicObject(19966, 2227.95532, -1925.49158, -12.90024, ? -5.00000, 0.00000, 270.00000);

CreateDynamicObject(19172, 2219.52905, -1925.49097, -10.46430, ? 0.00000, 0.00000, 90.00000);

CreateDynamicObject(2254, 2221.97559, -1922.66626, -10.34280, ? 0.00000, 0.00000, 270.00000);

CreateDynamicObject(2276, 2221.33960, -1929.05957, -10.55330, ? 0.00000, 0.00000, 180.00000);

CreateDynamicObject(1893, 2223.96118, -1930.80969, -8.45830, ? 0.00000, 0.00000, 0.00000);

CreateDynamicObject(1893, 2224.86304, -1923.77844, -8.65829, ? 0.00000, 0.00000, 0.00000);

CreateDynamicObject(1893, 2220.21777, -1922.80176, -8.65829, ? 0.00000, 0.00000, 0.00000);

CreateDynamicObject(1893, 2220.16040, -1927.42273, -8.65829, ? 0.00000, 0.00000, 0.00000);

CreateDynamicObject(1893, 2221.39258, -1930.88416, -8.45830, ? 0.00000, 0.00000, 0.00000);

CreateDynamicObject(1893, 2221.34546, -1934.36377, -8.45829, ? 0.00000, 0.00000, 0.00000);

CreateDynamicObject(1893, 2221.28979, -1937.37695, -8.45830, ? 0.00000, 0.00000, 0.00000);

CreateDynamicObject(1893, 2224.06226, -1937.33362, -8.45830, ? 0.00000, 0.00000, 0.00000);

CreateDynamicObject(1893, 2224.01563, -1934.32617, -8.45830, ? 0.00000, 0.00000, 0.00000);

CreateDynamicObject(2616, 2221.29004, -1939.42334, -10.67523, ? 0.00000, 0.00000, 179.50012);

CreateDynamicObject(1690, 2043.27966, -1901.16931, 19.50220, ? 0.00000, 0.00000, 0.00000);

CreateDynamicObject(19452, 2228.32373, -1921.89673, -10.74520, ? 0.00000, 0.00000, 0.00000);


  [Showcase/Mapp] Bunker attempt fallout
Posted by: Apex - 2019-04-14, 12:35 AM - Forum: Videos and Screenshots - Replies (9)

Do you think this mapp looks like fallout?



[Image: sa-mp-155.png]



[Image: sa-mp-156.png]


I make with default objects, i don't use models made by my


  Fran?ais
Posted by: neutral - 2019-04-14, 12:34 AM - Forum: French/Fran?ais - Replies (35)

Un peu de fran?ais?


  [Showcase/Map] Medieval Island
Posted by: Apex - 2019-04-14, 12:34 AM - Forum: Videos and Screenshots - Replies (8)

This map is very old, from my gallery, my contact in discord is Apex # 0687



[Image: sa-mp-146.png]

[Image: sa-mp-147.png]

[Image: sa-mp-148.png]

[Image: sa-mp-149.png]

[Image: sa-mp-150.png]

[Image: sa-mp-151.png]





Why do I upload this old map? why I like it and I hope that you too


  [Showcase/Map] Poor Town Hall
Posted by: Apex - 2019-04-14, 12:31 AM - Forum: Videos and Screenshots - Replies (7)

My contact on discord is Apex#0687



[Image: sa-mp-131.png]

[Image: sa-mp-132.png]

[Image: sa-mp-130.png]


  [Showcase/Mapp] Sewer
Posted by: Apex - 2019-04-14, 12:28 AM - Forum: Videos and Screenshots - Replies (7)

My contact on discord is Apex#0687



[Image: sa-mp-102.png]

[Image: sa-mp-103.png]

[Image: sa-mp-104.png]

[Image: sa-mp-105.png]

[Image: sa-mp-106.png]

[Image: sa-mp-107.png]

[Image: sa-mp-108.png]

[Image: sa-mp-109.png]



If you want know the objects let me know, i can help you if i can.


  Romanian section
Posted by: Reachless - 2019-04-14, 12:25 AM - Forum: Chat - Replies (1)

Hey there, I think it would be great if we could have a Romanian section, given that a lot of SA:MP's playerbase is represented by my fellow Romanians. I would be more than glad to help with the section.

Edit: My bad, I posted in the wrong section by mistake


Information Presentaci?n
Posted by: Mugsy - 2019-04-14, 12:12 AM - Forum: Spanish/Espa?ol - Replies (12)

Hola chicos, estare publicando mis proyectos y codigos por aqui, algunos me conocen como Breeze, SA**?esta?muerto, suerte a todos y nos veremos por aqui.


Tongue C?mo pongo mi firma?
Posted by: Angel_Jaeger - 2019-04-14, 12:00 AM - Forum: Spanish/Espa?ol - Replies (5)

?C?mo pongo mi firma?