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

Username
  

Password
  





Search Forums



(Advanced Search)

Forum Statistics
» Members: 5,747
» Latest member: gianh5781
» Forum threads: 2,157
» Forum posts: 11,987

Full Statistics

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

Latest Threads
Ledger Live
Forum: Chat
Last Post: sofieaseeia
10 hours ago
» Replies: 0
» Views: 4
What are the ways to impr...
Forum: General Discussions
Last Post: claraalex620
11 hours ago
» Replies: 1
» Views: 43
Ledger Live | Ledger Live...
Forum: General Discussions
Last Post: jma219866
11 hours ago
» Replies: 0
» Views: 1
How Does USA Website Desi...
Forum: Programming
Last Post: Jennypiffer
Yesterday, 09:01 PM
» Replies: 0
» Views: 19
Understanding the Role of...
Forum: General Discussions
Last Post: JennyXavier
Yesterday, 06:14 PM
» Replies: 0
» Views: 12
Exploring the Insights: U...
Forum: Questions and Suggestions
Last Post: BarbaraElizabeth
Yesterday, 04:59 AM
» Replies: 0
» Views: 7
Looking for affordable bo...
Forum: Art
Last Post: Chrisevans
2024-05-07, 06:56 PM
» Replies: 0
» Views: 111
What is NFTFN?
Forum: Questions and Suggestions
Last Post: loverrhoan85
2024-05-07, 05:21 PM
» Replies: 0
» Views: 14
casinoua
Forum: General Discussions
Last Post: ididoso228
2024-05-07, 05:21 PM
» Replies: 0
» Views: 16
Drive Sales with our PPC ...
Forum: Programming
Last Post: AndreasPatek
2024-05-07, 04:46 PM
» Replies: 0
» Views: 16

 
  Task-based (async) dialog handling with PawnPlus
Posted by: Graber - 2019-04-13, 03:43 PM - Forum: Libraries - Replies (6)

samp-async-dialogs



[Image: sampctl-samp--async--dialogs-2f2f2f.svg?...-the-badge]



Async dialog handling with PawnPlus tasks.



Installation



Simply install to your project:



Code:
sampctl package install AGraber/samp-async-dialogs



Include in your code and begin using the library:



Code:
#include <async-dialogs>



It is recommended that you set a PawnPlus version explicitely on your pawn.json (preferibly the latest) to avoid always downloading the latest one.



If you don?t use sampctl, just download the async-dialogs.inc include and drop it to your includes/ folder, and then download the PawnPlus plugin and include from here.



While you?re on it and if you don?t use PawnPlus yet, you should check it out!



Usage



This include provides one single function



Code:
AwaitAsyncDialog(playerid, dialog_response[e_DIALOG_RESPONSE_INFO], style, const caption[], const info[], const button1[], const button2[])



This will show the dialog and await for the response, which will pause the current script?s execution and return the yielded value to the last public function (or 0 if it wasn?t set). When it?s responded to, the response details will be inside the dialog_response[e_DIALOG_RESPONSE_INFO] array. If another dialog gets shown while awaiting, the Task will be discarded with any following code that was to be resumed.



Example command:



Code:
CMD:asyncdialog(playerid, params[])

{

??? task_yield(1);



??? new dialog_response[e_DIALOG_RESPONSE_INFO];

??? AwaitAsyncDialog(playerid, dialog_response, DIALOG_STYLE_LIST, "Example dialog", "This is listitem 0\nAnd this is one\nShow example nested dialog", "ok", "no");



??? if(dialog_response[E_DIALOG_RESPONSE_Response])

??? {

??????? if(dialog_response[E_DIALOG_RESPONSE_Listitem] == 2)

??????? {

??????????? new other_dialog_response[e_DIALOG_RESPONSE_INFO];

??????????? AwaitAsyncDialog(playerid, other_dialog_response, DIALOG_STYLE_MSGBOX, "Example nested dialog", "You will recieve a message\nwhichever your response is", "OK", "Yes");



??????????? SendClientMessage(playerid, COLOR_WHITE, "You responded something to the example dialog");

??????? }

??????? else

??????? {

??????????? SendClientMessageEx(playerid, COLOR_WHITE, "Recieved: listitem = %d | inputtext = %s", dialog_response[E_DIALOG_RESPONSE_Listitem], dialog_response[E_DIALOG_RESPONSE_InputText]);

??????? }

??? }

??? else

??? {

??????? SendClientMessage(playerid, COLOR_WHITE, "Bye!");

??? }

}





Thanks


  • IllidanS4 for PawnPlus, which allowing this and even more awesome stuff

  • TommyB for helping me test it out on a real environment


  Whats your Burgershot order?
Posted by: Charlie - 2019-04-13, 03:29 PM - Forum: Chat - Replies (20)

[Image: fJFAGqi.png]


  Daily dogs appreciation thread
Posted by: cuddlypanda - 2019-04-13, 03:09 PM - Forum: Chat - Replies (40)

Hello, I share dog pics daily, thanks.

You can share any dog pics you want, yours or from social media!

(There would be?a separate topic for non-dog pics so please don't post them here! :p)



[Image: jMUMZYo.jpg]


  Underground Multiplayer - Animated Objects
Posted by: BadassBaboon - 2019-04-13, 06:37 AM - Forum: Videos and Screenshots - Replies (14)

Something I've been testing recently, prove the concept of Animated objects in UGMP, works pretty fine!



[Video: https://youtu.be/WXMrtdOK4oM]





Finally, I can post UGMP stuff without them magically disappearing like on SAMP Forums.


  Function overloading?
Posted by: mr_sacrimoni - 2019-04-13, 06:31 AM - Forum: Pawn Scripting - Replies (2)

I've seen a tutorial on function overloading but that just seems kind of bad.?



I'm creating a function to manipulate entity data (players, houses, businesses, etc.). Since I plan to generate sql queries inside the function I wanted to have the ability of manipulating with player data if the player is online or offline.



My question is, is there any possibility of creating function overloading with the first parameter either being int (playerid) and string (playername). I guess it creates a problem with one being variable and other an array.?



I have been searching forums, github, pawn documentation but still nothing. I figured if anybody can help me it must be Y_Less.


  Media Question
Posted by: Bluman - 2019-04-13, 12:23 AM - Forum: Chat - Replies (5)

Hello Grand Theft Auto Gods and Goddesses. Are we allowed to post youtube videos here or is that illegal?



I don't want to be banned for sharing a vevo channel?or samp dm video from YouTube!


  Do you know/like psychedelic trance?
Posted by: GiamPy - 2019-04-12, 09:52 PM - Forum: Chat - Replies (2)

Support me on SoundCloud and Facebook.



https://soundcloud.com/ypmgmusic



https://www.facebook.com/yaipmg/



Tell me if you like it! :)


  TFA_SAMP - 1st two-factor authentication method for SA-MP.
Posted by: GiamPy - 2019-04-12, 09:37 PM - Forum: Libraries - Replies (8)

TFA_SAMP - 1st two-factor authentication method for SA-MP.

A huge thanks to Authy (https://www.authy.com/) for providing the web APIs.

Include release under GPL v2 OSL (open source license) - click here for more information.

Part of the include is made in PHP.




Hello everyone.



Recently I was thinking of a new include to release, and I thought about a two-factor authentication method for SA-MP, something like it has never existed before. This include does not directly provide the authentication method, it is just a way to communicate with the service that provides so, which in this case is Authy.



Authy provides also free-plans for development or fairly small communities.

Visit https://www.authy.com/ for more information.



If you don't know what a two-factor authentication method is, read this page.



However, here's a short description.

Quote:Multi-factor authentication (also MFA, Two-factor authentication, TFA, T-FA or 2FA) is an approach to authentication which requires the presentation of two or more of the three authentication factors: a knowledge factor ("something only the user knows"), a possession factor ("something only the user has"), and an inherence factor ("something only the user is"). After presentation, each factor must be validated by the other party for authentication to occur.




This include allows you to communicate with API requests to Authy's servers and to use your cellphone as second factor, which is the possession factor. In order to be it two-factor, thus increasing the account' security, you must ask for the password and the token sent via SMS or taken by the phone application.



So, what is Authy? Authy is what gives us the API to communicate with the server and to send the SMS / verify the token taken by your phone.



If you are worried about security, the API requests through the production method are sent through HTTPS requests, and all the information are not saved in any TFA_SAMP database but in Authy's databases which are completely safe and secure.






Available Functions


  • TFASAMP_prepareConnection(host[], password[], api_key[], type[] = "production", bool:tfa_debug = false)

  • TFASAMP_createUser(playerid, email[], cellphone[], area_code[] = "1")

  • TFASAMP_verifyToken(playerid, user_id, token[], bool: force = true)

  • TFASAMP_setPlayerUserID(playerid, userid)

  • TFASAMP_getPlayerUserID(playerid)



Available Callbacks


  • TFASAMP_OnTokenVerify(playerid, result)




Documentation



You may find here the updated functions documentation.



Example



You may find an example of the include here.


  Post your SA-MP forums ban!
Posted by: spacemud - 2019-04-12, 08:41 PM - Forum: Chat - Replies (44)

[Image: jHPCF5d.png]


  Fallen 4/11 and 4/12 heros
Posted by: Markski - 2019-04-12, 08:40 PM - Forum: Chat - Replies (26)

[Image: unknown.png?width=666&height=585]

Thanks riddick for professional photoshop

Never forget our brave heros

Except j0sh so much for saving the ban for something good


Click this link for a comprehensive list of amazing, fair and clear ban reasons

SA-MP has died. Long live SA-MP.