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

Username
  

Password
  





Search Forums



(Advanced Search)

Forum Statistics
» Members: 7,023
» Latest member: skatcharon
» Forum threads: 2,349
» Forum posts: 12,235

Full Statistics

Online Users
There are currently 195 online users.
» 0 Member(s) | 193 Guest(s)
Bing, Google

Latest Threads
DOF2.1 (DOF2 Updated)
Forum: Libraries
Last Post: GracieStith
2 hours ago
» Replies: 1
» Views: 840
Kontak Layanan CIMB Niaga...
Forum: Support
Last Post: bosquee9053
Yesterday, 03:44 PM
» Replies: 0
» Views: 15
CS Bank DBS Customer Cent...
Forum: Chat
Last Post: bosquee9053
Yesterday, 03:37 PM
» Replies: 0
» Views: 17
Sponsors and Donations
Forum: Questions and Suggestions
Last Post: NoxxeR
Yesterday, 05:48 AM
» Replies: 0
» Views: 26
I know Kalcor left the bu...
Forum: Questions and Suggestions
Last Post: NoxxeR
Yesterday, 05:40 AM
» Replies: 2
» Views: 66
Best practices for conver...
Forum: Tech
Last Post: Mido
2025-04-19, 09:53 PM
» Replies: 1
» Views: 80
A simple suggestion as a ...
Forum: Questions and Suggestions
Last Post: Mido
2025-04-19, 09:47 PM
» Replies: 1
» Views: 39
Steps to unlock Apple ID ...
Forum: Tech
Last Post: fubolink
2025-04-17, 03:50 PM
» Replies: 0
» Views: 39
What got you into SA-MP a...
Forum: Chat
Last Post: alecnia
2025-04-17, 01:17 AM
» Replies: 1
» Views: 150
I would like to know abou...
Forum: General Discussions
Last Post: Wriney
2025-04-15, 07:14 AM
» Replies: 0
» Views: 63

 
  Sending message to Discord
Posted by: Kox - 2023-02-19, 12:35 PM - Forum: Tutorials - Replies (2)

Hi,

This tutorial aims to give you a basic example about how to use a webhook to send message from your OpenMP/SA-MP server into a discord channel.

Requirements :


1) Install pawn-requests package on your server
  • Install the package with sampctl or manually

2) Creating a Discord webhook
  1. Create text channel
  2. Click "Edit Channel" =>  Integrations => Create Webhook
  3. Click on the Webhook => Copy Webhook url (save it for later)

3) Send message from server
  1. Add requests include and create a RequestsClient with your webhook url
    PHP Code:
    #include <requests>

    new RequestsClient:client;
    main()
    {
        client RequestsClient("replace with your webhookurl");


  2. Send message to discrod
    PHP Code:
    public OnPlayerConnect(playerid)
    {
        new name[MAX_PLAYER_NAME 1];
        GetPlayerName(playeridnamesizeof(name));
        new string[MAX_PLAYER_NAME 23 1];
        format(stringsizeof(string), "%s has joined the server."name);
        RequestJSON(
            client,
            "",            
            HTTP_METHOD_POST

            "OnPostJson",    
            JsonObject
    (
                "content"JsonString(string)
            )
        );
        return 1;
    }

    forward OnPostJson(Request:idE_HTTP_STATUS:statusNode:node);
    public 
    OnPostJson(Request:idE_HTTP_STATUS:statusNode:node
    {
        if(status == HTTP_STATUS_NO_CONTENT) {
            printf("successfully posted message");
        }
        else 
        {
            printf("failed to post message");
        }


Now when a player connect to the server, a message will be sent on the discord channel.

[Image: webhook-discord.png]

Credits
Southclaws for the requests package


Regards


  State of the Game 2023
Posted by: wit - 2023-02-11, 01:54 PM - Forum: General Discussions - No Replies

Hello.

Long-time SA:MPer, roleplayer, modder, server owner, and overall supporter of the broader community here returning after a sizeable hiatus.

As with most people floating back into the community after such a time -- and still without a central official forum via which to communicate -- I'm a little in the dark as to how alive the scene still is in 2023. I'm more than aware of the myriad of Middle Eastern and BRIC country communities still extant on the platform but my passion has always been the English language roleplaying scene.

Shortly after I last visited the community, mmartin's Los Santos Roleplay shut its SA:MP server in preparation for a GTA V multiplayer server that from my understanding has yet to materialise. Singleplayer Roleplay was doing well under Reyo and Dignity and has since merged with Red County Roleplay to form GTA Chronicles. The work they've put into revitalising the tired Los Santos environments of 2004 is unprecedented but I can't help but feel that it's a bit of a missed opportunity given the grander tech demos that came out of the SA:MP DL branch releases.

What is left? Is there some burgeoning roleplaying community that has escaped my notice or have most players whose PCs can handle it left for GTA V?
Is there any room left for innovation and newer communities on the platform? There were talks of Liberty City and Vice City roleplaying servers years back but from what I can see none of them survived or perhaps even made it to release at all.

Thanks for reading and thank you in advance for answering my many questions.


  GTA SA DE is the future
Posted by: NoxxeR - 2023-02-01, 08:52 PM - Forum: General Discussions - Replies (4)

Why dont sa-mp team or open.mp team release open.mp or samp support for SA DE, I installed the game some year ago, and now tried it again, its better than regular san andreas.

And it looks cool with the white colors which sorround the players, this is cool:

https://www.youtube.com/watch?v=TtWxflUBlI0

GTA SA Defintive edition is the future, its based on the same engine as fortnite and people would pay money to play this online in years from now. Open MP is the future and can save people.

Theres even better grahpics in GTA SA DE than regular GTA san andreas, so what do the developers of open mp think? :)

Which road is open mp gonna take, I dont hang around on discord so I dont know what you chat about there.


Information There is a problem with the output of messages to the server console.
Posted by: droffet_studio - 2023-01-29, 11:46 AM - Forum: Questions and Suggestions - Replies (2)

Hello, there is a problem with outputting arrays from include to the server console. I am using visual studio code, windows 10 x64.
The essence is the following, I have an include in which there is a stock to return arrays with a parameter, similar to:



Code:
stock GetNickName(playerid)
{
      new string[MAX_PLAYER_NAME];
      GetPlayerName(playerid, string, MAX_PLAYER_NAME);
      return string;
}


I use windows encoding 1251 on the main script file of the server and on the include, in my code there are functions that, roughly speaking, output messages from the array directly to the server console, this is what happens:

Code:
[2023-01-29T14:40:27+0300] [Info] [
[2023-01-29T14:40:27+0300] [Info] [
[2023-01-29T14:40:27+0300] [Info] Legacy Network started on port 7777


Instead of "[2023-01-29T14:40:27+0300] [Info] [" it should be "[БАЗА ДАННЫХ] reconnect 18 sec...".

I think the essence of the problem is clear, by the way - everything works fine on samp-server.exe, messages are output to the console on windows 1251 without any problems.



Здравствуйте, проблема с выводом массивов из инклуда в консоль сервера. Я пользуюсь visual studio code, windows 10 x64. 
Суть следующая, у меня есть инклуд в котором есть stock для возвращения массивов с параметром, на подобии:

Code:
stock GetNickName(playerid)
{
     new string[MAX_PLAYER_NAME];
     GetPlayerName(playerid, string, MAX_PLAYER_NAME); 
     return string;
}

Я использую кодировку windows 1251 на главном сценарном файле сервера и на инклуде, в моем коде есть функции, которые грубо говоря - выводят сообщения из массива прямо в консоль сервера, вот что получается:
Code:
[2023-01-29T14:40:27+0300] [Info] [
[2023-01-29T14:40:27+0300] [Info] [
[2023-01-29T14:40:27+0300] [Info] Legacy Network started on port 7777

Вместо "[2023-01-29T14:40:27+0300] [Info] [" должно быть "[БАЗА ДАННЫХ] reconnect 18 sec...".

Думаю, суть проблемы ясна, к слову - на samp-server.exe работает все нормально, сообщения в консоль выводятся на windows 1251 без каких либо проблем.


  Problem with compiler
Posted by: MirzaTinjak - 2023-01-27, 10:53 PM - Forum: Pawn Scripting - Replies (1)

Hi there. 
I have one error message that i can't resolve:

Code:
C:\Users\Mirza\Documents\Mirza\SAMP_server\SAMP_server\Server\qawno\include\YSI_Storage\y_ini\..\..\YSI_Core\y_core\y_core_entry.inc(120) : user error: YSI assumes `sNAMEMAX` is 31.

tasks.json for compiler settings, in VS Code:

Code:
[color=#000000]{[/color][/font][/color]
[color=#000000]  {
[/color]
"version": "2.0.0",
"tasks": [
{
"label": "build-normal",
"type": "shell",
"command": "${workspaceRoot}/Server/qawno/pawncc.exe",
"runOptions": {
"instanceLimit": 1,
},
"args": [
"${file}",
"-Dgamemodes",
"'-;+'",
"'-(+'",
"'-d3'",
"'-Z+'"
],
"group": {
"kind": "build",
"isDefault": true
},
"isBackground": false,
"presentation": {
"reveal": "always",
"panel": "dedicated"
},
"problemMatcher": {
"owner": "pawn",
"fileLocation": [
"relative",
"${workspaceRoot}"
],
"pattern": {
"regexp": "^(.*?)\\(([0-9]*)[- 0-9]*\\) \\: (fatal error|error|warning) [0-9]*\\: (.*)$",
"file": 1,
"location": 2,
"severity": 3,
"message": 4
}
}
}
],
[color=#000000]}[/color][color=#000000][font=Consolas, 'Courier New', monospace]


I include YSI like this:


Code:
[/font][/color]
#include <open.mp>
#include <a_mysql>
#include <a_http>
#include <sscanf2>
#include <streamer>
#include <YSI_Storage\y_ini>
#include <YSI_Data\y_iterate>
#include <YSI_Coding\y_timers>
[color=#000000][font=Consolas, 'Courier New', monospace]



I try to modify compiler settings but I couldn't find any solution for it.


  [OMP] Errors compiling
Posted by: leoclose575 - 2023-01-27, 09:08 PM - Forum: Pawn Scripting - Replies (3)

Hello, I tried to compile samp gamemode with open.mp and encountered errors and warning that I can't find anywhere in docs

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) ------> error 025: function heading differs from prototype
                                                                                                                      warning 213: tag mismatch: expected tag "t_KEY", but found none ("_")

public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ) ----------> error 025: function heading differs from prototype

GivePlayerWeapon(playerid, 31, 15); ------------------> warning 213: tag mismatch: expected tag "t_WEAPON", but found none ("_")


  HELP BUG
Posted by: rockys - 2023-01-26, 04:41 PM - Forum: Pawn Scripting - No Replies

HI, i have a bug on my server
OMP RC2

When you die inside vehicle by explosion and you got spawn inside an interior on your screen apper a visual bug, if i spawn again the visual bug dissaper

[/url]Imgur: The magic of the Internet[url=https://imgur.com/a/8bbCIiM]


  sa-mp-0.3.7-R5...
Posted by: Gm_KoDi - 2023-01-26, 04:18 PM - Forum: General Discussions - Replies (4)

Hello, I was looking at the official SAMP website and noticed that a new client version has been released, now there is version R5, does anyone know what has changed?


  Как добавить плагины?
Posted by: droffet_studio - 2023-01-24, 03:02 PM - Forum: Chat - Replies (2)

Как добавить плагины на сервер R2? Не могу поставить плагин mysql 41-4.


  upgrade open mp
Posted by: alexandreolv3 - 2023-01-23, 06:46 PM - Forum: Questions and Suggestions - Replies (2)

Hello, good afternoon! how do I upgrade my samp server to Open MP?