Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - gamingpro

#1
Community Plugins / Re: Discord Plugin
May 04, 2024, 02:21 AM
Quote from: Samir_HG on Aug 04, 2022, 05:13 PMI'm having this problem when trying to connect:
[2022-08-04 21:56:45] [connect] Successful connection
[2022-08-04 21:56:45] [error] handle_transport_init received error: TLS handshake failed
[2022-08-04 21:56:45] [info] asio async_shutdown error: asio.ssl:336462231 (shutdown while in init)
disconnect
[2022-08-04 21:56:45] [connect] Successful connection
[2022-08-04 21:56:45] [error] handle_transport_init received error: TLS handshake failed
[2022-08-04 21:56:45] [info] asio async_shutdown error: asio.ssl:336462231 (shutdown while in init)
disconnect

Plugin versions used: x32 and x86
Systems used: Windows 10 Pro 21H2 and Ubuntu 20.04 (both updated)
OpenSSL downloaded from https://slproweb.com/products/Win32OpenSSL.html
Tried all versions available on the website.

On Linux, I downloaded libssl-dev as instructed in this tutorial.

I'm using the exact same script that worked months ago.
As a precaution, I decided to create a new one with only the most basic functions as suggested in more recent tutorials and also the examples on GitHub pages.

Two different ISPs were used in the connection attempt. In all the above scenarios returns the same error.
#2
i did that but not success too, that sometimes get server name Unknown Server
#3
General Discussion / Re: 0.4 PHP Maserlist
Feb 09, 2024, 02:00 AM
ah bro how to recompile it and how compile it Please reply.
#4
General Discussion / Re: Help Regard Hosting
Feb 08, 2024, 06:06 PM
Please can someone help me ? i have announcer plugin and all things fine when me did port forward i goto master.vc-mp.org/servers i see my server added in it but not shown in VCMPBrowser masterlist(s) and the server not being online can anyone solve it please learn me How ?
#5
Man so thank you but i need add messages in more than x1 channel how ? and i need know if player role ID  ?
#6
Hi bro, Can you tell me how you port forward please ?, because i try it but not success please tell me, Are port forward show server in masterlist or not ?
#7
Community Plugins / Re: Discord Plugin
Dec 07, 2023, 01:40 PM
when me open server32.exe console its showing me Handle_transport_init receivied error: TLS...
#8
Script Showroom / Temp ban system (gamingpro)
Jul 17, 2023, 12:42 AM
Hey guys 8) , i maded this tempban system, i love to share all things i maded it to others, for help  :) ,
Now this is the code:



Add that line in onScriptLoad function

TempBans <- ConnectSQL("TempBans.db");
QuerySQL(TempBans, "CREATE TABLE IF NOT EXISTS TempBans(Name TEXT, UID TEXT, UID2 TEXT, IP FLOAT, Admin TEXT, Reason TEXT, Time INTEGER, NowTime INTEGER)");


Add this line in onPlayerJoin function

CheckTempBan( player );


Add this line in onPlayerCommand Function

if( cmd == "tempban" )
{
if(!text) MessagePlayer("Error - use /"+cmd+" <Player/ID> [Days:Hours:Minutes] <Reason>",player);
else {
local plr = GetPlayer(GetTok(text, " ",1));local expire = GetTok(text, " ",2);local reason = GetTok(text, " ",3 NumTok(text, " "));local ban_expire = split(expire, ":");
if(!plr) MessagePlayer("Unknow player!",player);
else if(!expire) MessagePlayer("Error - Please write expire time format DAYS:HOURS:MINUTES and should numbers!",player);
else if(NumTok(expire, ":") != 3) MessagePlayer("Error - Invalid format, The format must be DAYS:HOURS:MINUTES!",player);
else if(IsNum(ban_expire[0]) && IsNum(ban_expire[1]) && IsNum(ban_expire[2]))
{
if(!reason) reason = "None";
local calc = (time()+ban_expire[0].tointeger()*24*60*60 + ban_expire[1].tointeger()*60*60 + ban_expire[2].tointeger()*60);
QuerySQL(TempBans, "INSERT INTO TempBans(Name, UID, UID2, IP, Admin, Reason, Time, NowTime) VALUES('"+plr.Name.tolower()+"', '"+plr.UniqueID+"', '"+plr.UniqueID2+"', '"+plr.IP.tofloat()+"', '"+player.Name+"', '"+reason+"', '"+calc+"', '"+time()+"')");
Message("[#FF0000]Admin:[ "+player.Name+" ] banned:[ "+plr.Name+" ] Reason:[ "+reason+" ] Time:[ "+GetRemainingTime(calc,time())+" ]");
plr.Kick();
}
else MessagePlayer("Error - Format must be integer!",player);
}
}
else if( cmd == "untempban" )
{
if(!text) MessagePlayer("Error - Syntax; /"+cmd+" <Full-Nick>",player);
else {
local q = QuerySQL(TempBans, "SELECT * FROM TempBans WHERE Name='"+text.tolower()+"'");
if(!q) MessagePlayer("Error - "+text+" is not tempbanned!.",player);
else {
QuerySQL(TempBans, "DELETE FROM TempBans WHERE Name='"+text.tolower()+"'");
MessagePlayer("[#00FF00][SUCCESS]: [#FFFFFF]"+text+" has been untempbanned!.",player);
}
}
}



Functions

function CheckTempBan(plr)
{
local q = QuerySQL(TempBans, "SELECT * FROM TempBans WHERE Name='"+plr.Name.tolower()+"'");
if(q){
local admin = GetSQLColumnData(q,4), reason = GetSQLColumnData(q,5),t = GetSQLColumnData(q,6);
if(time() >= t){
QuerySQL(TempBans, "DELETE FROM TempBans WHERE Name='"+plr.Name.tolower()+"'");
}
else {
Message("[#FF0000]"+plr.Name+" Banned from the server Reason:[ "+reason+" ] Admin:[ "+admin+" ], Time Left:[ "+GetRemainingTime(t.tointeger(),time().tointeger())+" ]");
plr.Kick();
FreeSQLQuery(q);
}
}
else {
local uid = QuerySQL(TempBans, "SELECT * FROM TempBans WHERE UID='"+plr.UniqueID+"'");
if(uid){
local admin = GetSQLColumnData(uid,4), reason = GetSQLColumnData(uid,5),t = GetSQLColumnData(uid,6);
if(time() >= t){
QuerySQL(TempBans, "DELETE FROM TempBans WHERE Name='"+plr.Name.tolower()+"'");
}
else {
Message("[#FF0000]"+plr.Name+" Banned from the server Reason:[ "+reason+" ] Admin:[ "+admin+" ], Time Left:[ "+GetRemainingTime(t.tointeger(),time().tointeger())+" ]");
plr.Kick();
FreeSQLQuery(uid);
}
}
else {
local uid2 = QuerySQL(TempBans, "SELECT * FROM TempBans WHERE UID2='"+plr.UniqueID2+"'");
if(uid2){
local admin = GetSQLColumnData(uid2,4), reason = GetSQLColumnData(uid2,5),t = GetSQLColumnData(uid2,6);
if(time() >= t){
QuerySQL(TempBans, "DELETE FROM TempBans WHERE Name='"+plr.Name.tolower()+"'");
}
else {
Message("[#FF0000]"+plr.Name+" Banned from the server Reason:[ "+reason+" ] Admin:[ "+admin+" ], Time Left:[ "+GetRemainingTime(t.tointeger(),time().tointeger())+" ]");
plr.Kick();
FreeSQLQuery(uid2);
}
}
else {
local ip = QuerySQL(TempBans, "SELECT * FROM TempBans WHERE IP='"+plr.IP.tofloat()+"'");
if(ip){
local admin = GetSQLColumnData(ip,4), reason = GetSQLColumnData(ip,5),t = GetSQLColumnData(ip,6);
if(time() >= t){
QuerySQL(TempBans, "DELETE FROM TempBans WHERE Name='"+plr.Name.tolower()+"'");
}
else {
Message("[#FF0000]"+plr.Name+" Banned from the server Reason:[ "+reason+" ] Admin:[ "+admin+" ], Time Left:[ "+GetRemainingTime(t.tointeger(),time().tointeger())+" ]");
plr.Kick();
FreeSQLQuery(ip);
}
}
}
}
}
}
function GetRemainingTime(basict, oldt)
{
    local time = basict-oldt, min = ( time / 60 ).tointeger();
    local year = 0, month = 0, week = 0, day = 0, hour = 0;
    local total_time = "";
    while(min >= 60){hour++;min-=60;}
    while(hour >= 24){day++;hour-=24;}
    while(day >= 7){week++;day-=7;}
    while(week >= 5){month++;week-=5;}
    while(month >= 12){year++;month-=12;}
    if(year > 0){if(total_time != "")total_time += year+" year(s), ";else total_time = year+" year(s) ";}
    if(month > 0){if(total_time != "") total_time += month+" month(s), ";else total_time = month+" month(s) ";}
    if(week > 0){if(total_time != "")total_time += week+" week(s), ";else total_time = week+" week(s) ";}
    if(day > 0){if(total_time != "")total_time += day+" day(s), ";else total_time = day+" day(s) ";}
    if(hour > 0){if(total_time != "")total_time += hour+" hour(s), ";else total_time = hour+" hour(s) ";}
    if(min > 0){if(total_time != "")total_time += min+" minute(s)"; else total_time = min+" minute(s) ";}
    if(year == 0 && month == 0 && week == 0 && day == 0 && hour == 0 && min == 0) total_time = "Some seconds and will unban";
    return total_time;
}
function GetTok( string, separator, n, ... )
{
 local m = ( vargv.len() > 0 ) ? vargv[ 0 ] : n, tokenized = split( string, separator ), text = "";

 if ( ( n > tokenized.len() ) || ( n < 1 ) ) return null;

 for ( ; n <= m; n++ )
 {
  text += text == "" ? tokenized[ n - 1 ] : separator + tokenized[ n - 1 ];
 }

 return text;
}
function NumTok(string, separator)
{
    local tokenized = split(string, separator);
    return tokenized.len();
}
function GetPlayer( target )
{
 local target1 = target.tostring();

 if ( IsNum( target ) )
 {
  target = target.tointeger();

  if ( FindPlayer( target) ) return FindPlayer( target );
  else return null;
 }
 else if ( FindPlayer( target ) ) return FindPlayer( target );
 else return null;
}
#9
Quote from: gamingpro on Jun 18, 2023, 02:27 PMincorrect its must be
CreateCheckpoint(player, ID, Showing(true or false), Vector(PosX, PosY, PosZ), ARGB(Alpha, Red, Green, Blue), Size);
The result is:
CreateCheckpoint(null, 0, true, Vector(-902.341,-345.601,13.3802), ARGB(355, 255, 0, 0), 2);
#10
incorrect its must be
CreateCheckpoint(player, ID, Showing(true or false), Vector(PosX, PosY, PosZ), ARGB(Alpha, Red, Green, Blue), Size);
The result is:
CreateCheckpoint(null, 0, true, Vector(-902.341,-345.601,13.3802), ARGB(355, 255, 0, 0), 2);
#11
you must be write: secondarydb <- ConnectSQL("IpToCountry.db");
#12
good
#13
Script Showroom / Re: Property script
Apr 14, 2023, 12:52 AM
Ty <3
#14
ty <3