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

Username
  

Password
  





Search Forums



(Advanced Search)

Forum Statistics
» Members: 7,495
» Latest member: luizluiz2520
» Forum threads: 2,412
» Forum posts: 12,359

Full Statistics

Online Users
There are currently 795 online users.
» 0 Member(s) | 792 Guest(s)
Bing, Google, Yandex

Latest Threads
Adding new vehicles and s...
Forum: Programming
Last Post: __.A.__
9 hours ago
» Replies: 0
» Views: 36
Zona América del Sur Free...
Forum: Advertisements
Last Post: kevinberriosflores
Yesterday, 02:16 PM
» Replies: 1
» Views: 59
Busco copia de gamemode S...
Forum: Spanish/Espa?ol
Last Post: briancristaldo2021
2025-09-11, 11:14 AM
» Replies: 0
» Views: 50
[Tutorial] Registrando o ...
Forum: Portuguese/Portugu?s
Last Post: Crazy_ArKzX
2025-09-09, 08:36 PM
» Replies: 0
» Views: 190
San Andreas Police Pursui...
Forum: Advertisements
Last Post: BriBri
2025-09-08, 10:09 PM
» Replies: 1
» Views: 270
Problem with plugins load...
Forum: Support
Last Post: MrKacu13
2025-09-08, 07:15 PM
» Replies: 9
» Views: 330
Compilation error
Forum: Pawn Scripting
Last Post: MrKacu13
2025-09-07, 07:18 AM
» Replies: 6
» Views: 330
Need help, problem when i...
Forum: Programming
Last Post: nonickowned
2025-09-06, 06:21 PM
» Replies: 0
» Views: 138
Transfer server from SAMP...
Forum: Support
Last Post: MrKacu13
2025-09-06, 04:03 PM
» Replies: 1
» Views: 229
Not relevant anymore
Forum: Questions and Suggestions
Last Post: peti
2025-09-05, 02:00 PM
» Replies: 0
» Views: 187

 
  samp-async-objects | Edit an object with pawnplus tasks!
Posted by: Mergevos - 2020-12-01, 11:42 PM - Forum: Libraries - No Replies

Redirect to github:?

[Image: Mergevos-samp--async--objects-2f2f2f.svg...-the-badge]

Installation



Simply install to your project:



Code:
sampctl package install Mergevos/samp-async-objects



Include in your code and begin using the library:



Code:
#include <async-objects>



Usage



Let's look at the following example:



Code:
YCMD:test(playerid, params[], help)

{

? ? if(help) {

? ? ? ? return 0;

? ? }

? ? SelectObject(playerid);



? ? return 1;

}



public OnPlayerSelectObject(playerid, type, objectid, modelid, Float:fX, Float:fY, Float:fZ)

{

? ? new obj_res[e_OBJECT_INFO];

? ? await_arr(obj_res) AsyncObject_Edit(playerid, objectid);

? ? print("Response awaited");

? ? if(obj_res[E_OBJECT_Response] == EDIT_RESPONSE_FINAL) {

? ? ? ? print("Response final, player clicked on save icon.");

? ? } else if(obj_res[E_OBJECT_Response] == EDIT_RESPONSE_CANCEL) {

? ? ? ? print("Canceled");

? ? }

? ? return 1;

}



The /test?command executes the SelectObject function which allows you to select an object you would like to edit. When you select the object it calls OnPlayerSelectObject, GUI is going to show up and allows you to edit, move, rotate and save the object changes. If you hit a cancel or the save button, it awaits task response and when it finishes, it returns task results in an array, thus, you can check, save and modify the object. In the code above, that array way obj_res, which is abbreviation of object_response, also, we've checked if player hit save button, a.k.a EDIT_RESPONSE_FINAL?or cancel button with obviously EDIT_RESPONSE_FINAL?and then we simply output a message. If, for some reason, messages didn't get output, then there's most likely a problem.



The functions you're going to use are:



Code:
Task: AsyncObject_Edit(playerid, objectid)



The params are obvious, the function also has a wrapper. By defining `ASYNC_OBJECT_SYNTAX_EDIT` you allow yourself to use it:

Code:
Task: EditObjectAsync(playerid, objectid)



Note: You've to put `OnPlayerEditObject` callback in your script.*



Testing



To test, simply run the package, connect to a server and then execute /test:



Code:
sampctl package run


  How to break line in TDE Editor
Posted by: Frajola - 2020-12-01, 10:04 PM - Forum: Pawn Scripting - Replies (1)

Hi guys. How do I break the line in the textdraw using the TDE Editor? I'm putting "\n" but it's not breaking the line.



[Image: RbOYy0Z.png]


Sad Fusez Map Editor not loading...
Posted by: cristixxh - 2020-12-01, 07:25 PM - Forum: Support - Replies (1)

Hi there! I got Fusez Map Editor, and I have a hosted server especially for this. I got the editor files in the server files, i put "filterscripts mapedit" into server.cfg, and there is nothing. It should normally show me the controls when joining the server, but it's working just as the simple bare gamemode. Any help, please?


  New feature in SA-MP -Piano
Posted by: ATomas - 2020-11-30, 08:12 PM - Forum: Videos and Screenshots - Replies (5)

Hello all,

I made a piano to SA-MP. You can play at this a real songs! Look at this:



https://www.youtube.com/watch?v=t-5Ipn0P...ZGamesPlay



play.superparba.eu:7777


  Texture Studio
Posted by: Sprwok - 2020-11-30, 07:02 PM - Forum: Support - No Replies

Hi, I have a problem with texture studio. I don't know why he shows me this error:



[debug] Run time error 8: "Heap underflow"

[debug]? Heap pointer (HEA) is 0x2525C50, heap bottom (HLW) is 0x2BF8B5C

[debug] AMX backtrace:





I need some help with that, thank's.


Question How to get camera angle
Posted by: Marllun - 2020-11-30, 02:05 PM - Forum: Pawn Scripting - Replies (3)

I would like to know how to get camera angle. Player camera.


Information My confusion with this new direction
Posted by: Pufty - 2020-11-29, 07:47 PM - Forum: General Discussions - Replies (1)

Hi. Only recently (1 hour ago) did I realize the old sa-mp forum is down and all the links are dead/removed. I tried following up and it led me this far, where I should put my faith in this place to continue what's being lost. I read up a bit on Open.MP and noticed people type up things about C with mentions of Git etc...



My confusion comes from not knowing how to code... Recently only deciding to come back with requests by an old friend part of a really small RP community, I can't seem to understand how things will go down. Open.mp is going to be something new and refreshing to this old game, still being able run the old plugins, but also be able to affect the game with other coding languages than pawn? I know MTA has Lua and I couldn't learn Lua to make that transition, so I sticked with Pawn.



I'm good at visual stuff, not coding and would usually take snippets of code or with the help of 10 wiki tabs 10 forum tabs make the thing I want in Pawn to run on a Roleplay script. I used to just take a base script publicly available and alter that beyond recognition. It was really fun and it worked without me knowing anything, so I wonder if that's going to continue being the case or will I have to adapt and learn to actually code. I already couldn't find anything related to a dns.dll outside of the broken links still showing in search results and the git page that showed something of the sort needed Visual Studio.



I just wonder how events will play out. Is SA-MP as a client not going to be available soon enough and is OMP going to be a whole other level that I need to prepare for? I'm really glad there are actual QnA streams that I will go through, but right now I felt I would start off a written discussion to get my non-coder brain picked on.


  Custom map in the form of chunks
Posted by: dignity - 2020-11-29, 05:41 PM - Forum: Videos and Screenshots - Replies (1)

Hello all,



As some of you know previously on SA-MP I worked on many niche servers such as Wild West Roleplay, Medieval Roleplay, and more.?With the coming of Open MP the original team has been reinvigorated with energy to continue the medieval project as we all have high hopes for this mod.



We've decided to make a custom map consisting entirely of chunks, similar to how the original base game was made.?



This means all decoration is part of the model itself which severely reduces object count. We have a system ingame that allows us to enable/disable chunks willingly as well as the ability for players to enable/disable shrubs based on their machine's performance.



Here are some renders and test images from the very first chunk we made, and below is also a video of the entire rendering system in action. (64x64 chunks, on a brazilian server for reasons)



https://i.imgur.com/lzfxI4v.png

https://cdn.discordapp.com/attachments/6...nknown.png



[Video: https://www.youtube.com/watch?v=dw0zycPk...e=youtu.be]



Thanks and let me know what you think!



PS: the bugs in the video are already patched :)


  Hide Audio Stream Message?
Posted by: sneakyevil - 2020-11-29, 04:46 PM - Forum: Pawn Scripting - Replies (5)

Is there way to somehow hide this message:

[Image: 7HJ7usC.png]


  OpenMP(Logo Client Design)
Posted by: RockstarMapping - 2020-11-29, 04:00 PM - Forum: Art - Replies (14)

Hello people. Here's some quick concept from me including both logo and client design. Both works are done in Photoshop, so it means it is just a visual idea not coded.?

The good thing about the logo is the fact that It can be combined with many colors-?



[Image: logo-2.png]



Two versions of client ( Dark and Light version)



[Image: dark.png]



[Image: version1.png]