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 - KrOoB_

#46
pics & video added  O:-)
#47
Script Showroom / Basic Tunning System w/GUI
Jul 18, 2020, 03:23 AM
While making this script i use KrLozz Vehicle System so they are compatible 100% (0 error).
and thanks NewK for help
You can use your own vehicle script it'll compatible with yours no problem :D ( if you get error please notice me)

INFO
First things first script create a table in db because it needs to store somewhere :D
then getting handling infos from car after this it writing to database.
Finally, player enter vehicle and trigger the function, function starts load the vehicles info's from database and done :THUMSUP: :D

I made it at night so there maybe error( i saw nothing tried 2 times ) please notice me good luck <3

WARNINGS

I'm not a designer don't judge me about pic and hud i'm learning still :D

The tunning packs are randomly set i just write numbers so car can be too crazy or just freeze the car :D


İf you are using krlozz's script or another and you have already vehicle database just add this code your server and start just one time it'll create a table and add vehicles you have in your db
[noae][noae][noae][noae][noae][noae]function onScriptLoad()
{
LoadTunning();
}

function LoadTunning()
{
local q = QuerySQL( Vehicles, "SELECT * FROM Creation" ), i = 0;
while( GetSQLColumnData( q, 0 ) )
{
local Model= GetSQLColumnData( q, 1 );
QuerySQL( Vehicles, "INSERT INTO Tunning ( ID, Acceleration, MaxSpeed, NumberGears, Flags ) VALUES ( '" + GetSQLColumnData( q, 0 ) + "','" + GetHandlingRule( GetSQLColumnData( q, 1 ), 14) + "','" + GetHandlingRule(GetSQLColumnData( q, 1 ), 13) + "', '" + GetHandlingRule(GetSQLColumnData( q, 1 ), 12) + "', '" + GetHandlingRule(GetSQLColumnData( q, 1 ), 28) + "' )" );
GetSQLNextRow( q );
i++;
}
print("Writen ("+i+")");
return 0;
}
[/noae][/noae][/noae][/noae][/noae][/noae]

I'm not a designer don't judge me about pic and hud i'm learning still :D



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


Server Side

[noae][noae][noae][noae][noae][noae]function onScriptLoad()
{
I_KEY <- BindKey(true, 0x49, 0, 0);
      ENTER <- BindKey(true, 0x0D, 0, 0);
    teleport <- array(GetMaxPlayers(),0);
  Customer <- CreateCheckpoint(null, 0, true, Vector(-846.449, -902.177, 11.1034), RGB(0, 0, 200), 3.0);
  Marker_Customer <- CreateMarker(0, Vector( -846.449, -902.177, 11.1034 ), 2, RGB(41, 182, 0), 20 );


//KrLoz script's db
Vehicles <- ConnectSQL( "scripts/Vehicles.db" );

QuerySQL(Vehicles, "CREATE TABLE IF NOT EXISTS Creation ( id NUMERIC, model NUMERIC, x NUMERIC, y NUMERIC, z NUMERIC, col1 NUMERIC, col2 NUMERIC, world NUMERIC, angle NUMERIC)" );
QuerySQL(Vehicles, "CREATE TABLE IF NOT EXISTS Sale ( ID NUMERIC, Cost NUMERIC, Owner TEXT, Shared TEXT, Shared2 TEXT )" );
LoadVehicles();

 QuerySQL(Vehicles, "create table if not exists Tunning ( ID NUMERIC, Acceleration FLOAT, MaxSpeed FLOAT, NumberGears NUMERIC, Flags Numeric ) ");
 tuni <- array(GetMaxPlayers(), null);

}

function onScriptUnload()
{
}
function LoadVehicles()
{
local q = QuerySQL( Vehicles, "SELECT * FROM Creation" ), i = 0;
while( GetSQLColumnData( q, 0 ) )
{
local
Model= GetSQLColumnData( q, 1 ),
X= GetSQLColumnData( q, 2 ),
Y= GetSQLColumnData( q, 3 ),
Z= GetSQLColumnData( q, 4 ),
Col1= GetSQLColumnData( q, 5 ),
Col2= GetSQLColumnData( q, 6 ),
World= GetSQLColumnData( q, 7 ),
Angle= GetSQLColumnData( q, 8 );
CreateVehicle( Model, World, Vector(X, Y, Z), Angle, Col1, Col2 );
GetSQLNextRow( q );
i++;
}
print("Vehicles Count ("+i+")");
return 0;
}

// ========================================== V E H I C L E   E V E N T S =============================================

function onPlayerEnterVehicle( player, vehicle, door )
{
local veh = player.Vehicle;

local q = QuerySQL(Vehicles, "SELECT * FROM Tunning WHERE ID = '" + vehicle.ID + "'");
 if (q)
 {
 veh.SetHandlingData(14, GetSQLColumnData(q, 1));
 veh.SetHandlingData(13, GetSQLColumnData(q, 2));
 veh.SetHandlingData(12, GetSQLColumnData(q, 3));
 veh.SetHandlingData(28, GetSQLColumnData(q, 4));
 }else
 {
local veh = vehicle.ID;
QuerySQL( Vehicles, "INSERT INTO Tunning ( ID, Acceleration, MaxSpeed, NumberGears, Flags ) VALUES ( '" + veh + "','" + GetHandlingRule( vehicle.Model, 14) + "','" + GetHandlingRule(vehicle.Model, 13) + "', '" + GetHandlingRule(vehicle.Model, 12) + "', '" + GetHandlingRule(vehicle.Model, 28) + "' )" );
 }
}

function IsVehForSale( id )
{
local q = QuerySQL( Vehicles, "SELECT * FROM Sale WHERE ID='"+id+"'" );
local own = GetSQLColumnData( q, 2 );
if ( own == "Unowned" ) return 1;
else return 0;
}
function IsOwnerOrSharer( veh, player )
{
local q = QuerySQL( Vehicles, "SELECT * FROM Sale WHERE ID='"+veh.ID+"'" );
local owner = GetSQLColumnData( q, 2 );
local sha = GetSQLColumnData( q, 3 );
local sha2 = GetSQLColumnData( q, 4 );
if ( ( owner == player.Name ) || ( sha == player.Name ) || ( sha2 == player.Name ) ) return 1;
else return 0;
}
function IsVehicleOwner( veh, player )
{
local q = QuerySQL( Vehicles, "SELECT * FROM Sale WHERE ID='"+veh.ID+"'" );
local owner = GetSQLColumnData( q, 2 );
if ( owner == player.Name ) return 1;
else return 0;
}

//================================= O T H E R F U N C T I O N S ==========================================================

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( plr )
{
if ( plr )
{
if ( IsNum( plr ) )
{
plr = FindPlayer( plr.tointeger() );
if ( plr ) return plr;
else return false;
}
else
{
plr = FindPlayer( plr );
if ( plr ) return plr;
else return false;
}
}
else return false;
}
// =========================================== P I C K U P   E V E N T S ==============================================

// =========================================== P L A Y E R   E V E N T S ==============================================


function onPlayerCommand( player, cmd, text )
{
if ( cmd =="pos")
{
    Message( ""+ player.Pos.x + ", " + player.Pos.y + ", " + player.Pos.z);

}
else if ( cmd == "cag")
{
local veh = FindVehicle(1);
veh.Pos = Vector( player.Pos.x + 1, player.Pos.y+1, player.Pos.z  );

}
else if(cmd == "bring") {
if(!text) MessagePlayer( "Error - Correct syntax - /bring <Name/ID>' !",player );
else {
local plr = FindPlayer(text);
if(!plr) MessagePlayer( "Error - Unknown player !",player);
else {
plr.Pos = player.Pos;
MessagePlayer( "[ /" + cmd + " ] " + plr.Name + " was sent to " + player.Name, player );
}
}
}
   
/*
else if(cmd == "exec")
{
if( !text ) MessagePlayer( "Error - Syntax: /exec <Squirrel code>", player);
else
{
try
{
local script = compilestring( text );
script();
}
catch(e) MessagePlayer( "Error: " + e, player);
}
}
    */
   
return 1;
}

function onClientScriptData( player )
{
local int = Stream.ReadInt(),
string = Stream.ReadString();
Message(""+ string);
if(string == "r1")
{
if( player.Vehicle)
{
local veh = player.Vehicle;
local q = QuerySQL(Vehicles, "SELECT * FROM Tunning WHERE ID = '" + veh.ID + "'");
if (q)
{
PlaySound(player.World, 50012, player.Pos);
veh.SetHandlingData(13, 1.0);
QuerySQL( Vehicles,"UPDATE Tunning SET Acceleration='"+ 10.0 +"' WHERE ID='"+player.Vehicle.ID+"'"); // 0.0 value is the new value of car's acceleration you need to change it with your values
QuerySQL( Vehicles,"UPDATE Tunning SET MaxSpeed='"+ 10.0 +"' WHERE ID='"+player.Vehicle.ID+"'");// 0.0 value is the new value of car's maxspeed you need to change it with your values
MessagePlayer("Vehicle successfully upgraded",player);
}
}else MessagePlayer("You need to be in a vehicle to do this", player)
  }
if(string == "motor2")
{
if( player.Vehicle)
{
local veh = player.Vehicle;
local q = QuerySQL(Vehicles, "SELECT * FROM Tunning WHERE ID = '" + veh.ID + "'");
if (q)
{
veh.SetHandlingData(13, 0.0);
PlaySound(player.World, 50011, player.Pos);
QuerySQL( Vehicles,"UPDATE Tunning SET MaxSpeed='"+ 0.0 +"' WHERE ID='"+player.Vehicle.ID+"'");// 0.0 value is the new value of car's maxspeed you need to change it with your values
MessagePlayer("Vehicle successfully upgraded",player);
}
}else MessagePlayer("You need to be in a vehicle to do this", player)
  }
if(string == "motor3")
{
if( player.Vehicle)
{
local veh = player.Vehicle;
local q = QuerySQL(Vehicles, "SELECT * FROM Tunning WHERE ID = '" + veh.ID + "'");
if (q)
{
veh.SetHandlingData(13, 0.0);
PlaySound(player.World, 50011, player.Pos);
QuerySQL( Vehicles,"UPDATE Tunning SET MaxSpeed='"+ 0.0 +"' WHERE ID='"+player.Vehicle.ID+"'"); // 0.0 value is the new value of car's maxspeed you need to change it with your values
MessagePlayer("Vehicle successfully upgraded",player);
}
}else MessagePlayer("You need to be in a vehicle to do this", player)
  }
if(string == "speed1")
{
if( player.Vehicle)
{
local veh = player.Vehicle;
local q = QuerySQL(Vehicles, "SELECT * FROM Tunning WHERE ID = '" + veh.ID + "'");
if (q)
{
veh.SetHandlingData(14, 0.0);
PlaySound(player.World, 50011, player.Pos);
QuerySQL( Vehicles,"UPDATE Tunning SET Acceleration='"+ 0.0 +"' WHERE ID='"+player.Vehicle.ID+"'"); // 0.0 value is the new value of car's acceleration you need to change it with your values
MessagePlayer("Vehicle successfully upgraded",player);
}
}else MessagePlayer("You need to be in a vehicle to do this", player)
  }
if(string == "speed2")
{
if( player.Vehicle)
{
local veh = player.Vehicle;
local q = QuerySQL(Vehicles, "SELECT * FROM Tunning WHERE ID = '" + veh.ID + "'");
if (q)
{
veh.SetHandlingData(14, 0.0);
PlaySound(player.World, 50011, player.Pos);
QuerySQL( Vehicles,"UPDATE Tunning SET Acceleration='"+ 0.0 +"' WHERE ID='"+player.Vehicle.ID+"'"); // 0.0 value is the new value of car's acceleration you need to change it with your values
MessagePlayer("Vehicle successfully upgraded",player);
}
}else MessagePlayer("You need to be in a vehicle to do this", player)
  }
if(string == "speed3")
{
if( player.Vehicle)
{
local veh = player.Vehicle;
local q = QuerySQL(Vehicles, "SELECT * FROM Tunning WHERE ID = '" + veh.ID + "'");
if (q)
{
veh.SetHandlingData(14, 0.0);
PlaySound(player.World, 50011, player.Pos);
QuerySQL( Vehicles,"UPDATE Tunning SET Acceleration='"+ 0.0 +"' WHERE ID='"+player.Vehicle.ID+"'"); // 0.0 value is the new value of car's acceleration you need to change it with your values
MessagePlayer("Vehicle successfully upgraded",player);
}
}else MessagePlayer("You need to be in a vehicle to do this", player)
  }
// After this, is yours you can add anything you want. for car Handling list http://wiki.thijn.ovh/index.php?title=Changing_Vehicle_Handling
}


// ====================================== C H E C K P O I N T   E V E N T S ==========================================

function onCheckpointEntered( player, checkpoint )
{
teleport[player.ID]=checkpoint.ID;
if ( teleport[player.ID] == 0)
{
Announce("Press I", player, 0);
}
}

function onCheckpointExited( player, checkpoint )
{
}

// =========================================== B I N D   E V E N T S =================================================

function onKeyUp( player, key )
{
  if (key == I_KEY)
    {
switch(teleport[player.ID])
{
case 0:
if( player.Vehicle)
{
local data = Stream();
data.StartWrite(  );
data.WriteInt(42);
Stream.SendStream(player)
}
break;
}
}
}

// ================================== E N D   OF   O F F I C I A L   E V E N T S ======================================


function SendDataToClient( player, ... )
{
    if( vargv[0] )
    {
        local     byte = vargv[0],
                len = vargv.len();
               
        if( 1 > len ) devprint( "ToClent <" + byte + "> No params specified." );
        else
        {
            Stream.StartWrite();
            Stream.WriteByte( byte );

            for( local i = 1; i < len; i++ )
            {
                switch( typeof( vargv[i] ) )
                {
                    case "integer": Stream.WriteInt( vargv[i] ); break;
                    case "string": Stream.WriteString( vargv[i] ); break;
                    case "float": Stream.WriteFloat( vargv[i] ); break;
                }
            }
           
            if( player == null ) Stream.SendStream( null );
            else if( typeof( player ) == "instance" ) Stream.SendStream( player );
            else devprint( "ToClient <" + byte + "> Player is not online." );
        }
    }
    else devprint( "ToClient: Even the byte wasn't specified..." );
}
[/noae][/noae][/noae][/noae][/noae][/noae]

Client Side

you need to download it Client Side and sound in this

I just spilled water on my desk f-ck,
see u guys <3

 :edit: Vehicles.db -  Example DB
#48
Script Showroom / Hot-Job Script
Jul 16, 2020, 07:51 AM
Don't mind the title, it's look cool :D whatever this script basically bank money delivery job system.
You can change marker/job path, anything.
this is my first rp job script and it's little messed up sorry for that: D
in future i'll do better than this
good luck O0

Let's watch some frame


Download
And there you go

Warn! I see 0 error but if you see tell me please :))
Test Server
80.253.245.58:8192
#49
andd screen shots never comes like my gf :(
#50
Quote from: habi on Jul 14, 2020, 08:09 AMI can understand. But can you explain your work a little.

We touch some pickup and this picture appear on screen?
i woke up now,

system works with keyboard key (onKeyDown)
so if you want to show/hide inventory menu press I button on keyboard
and if you want to eat or drink something u need to click the icons which are on inventory menu :)

Quote from: Sebastian on Jul 14, 2020, 10:37 AMI recommend you to reupload it, but with the things you have done only. No need to upload the server.exe and other files which everybody should have by standard.

PS: The picture looks good!

Done! :thumbs_up: :)
#51
Good morning again, i'm not a person who likes sleeping so i made this system good luck :)
(you can change item icons/you can add more items and easy to connect login/register systems)
Click go brr

Some pictures (just one :D)



HUD file for designers :D  HUD1.psd
(Photoshop)
#52
and this is proof of that @Athanatos
#53
Quote from: habi on Jul 13, 2020, 01:57 PMnice, no sound from video?
Game sounds off in my game
#54
Script Showroom / Would you like some Water ?
Jul 13, 2020, 02:14 AM
Basic Thirst/Hunger Script
Thanks Xmair for helps <3
It can be "Hungery" script also, if you change the vars :D
Server Side
[spoiler][noae][noae][noae]function onScriptLoad()
{
   thirst <- array( 1000, 100 );
}

function onPlayerRequestSpawn( player )
{
    thirst[ player.ID ] = 100;
}

function onPlayerSpawn( player )
{
local th = thirst[ player.ID ]
                        local data = Stream();
                        data.StartWrite( );
                        data.WriteInt( 42 );
                        data.WriteString(th);
                        data.SendStream( player );
}
function Thirst()
{
for (local i = 0; i <GetMaxPlayers (); i ++)
{
local player = FindPlayer (i);
if (player)
{
if (player.IsSpawned)
{
if ( thirst[ player.ID ] >= 1 )
{
thirst[ player.ID ] -= 5;
local th = thirst[ player.ID ]
                        local data = Stream();
                        data.StartWrite( );
                        data.WriteInt( 42 );
                        data.WriteString(th);
                        data.SendStream( player );
}
if ( player.Vehicle )
{
thirst[ player.ID ] -= 0.00001;
local th = thirst[ player.ID ]
                        local data = Stream();
                        data.StartWrite( );
                        data.WriteInt( 42 );
                        data.WriteString(th);
                        data.SendStream( player );
}
else if ( thirst[ player.ID ] < 1 )
{
player.Speed = Vector( 0, 0, 0 );
                            player.Health -=100;
local th = thirst[ player.ID ]
                            local data = Stream();
                            data.StartWrite( );
                            data.WriteInt( 42 );
                            data.WriteString(th);
                            data.SendStream( player );
}
}
                if ( player.Health == 1 )
                {
                    thirst[ player.ID ] -= 0.001;
local th = thirst[ player.ID ]
                    local data = Stream();
                    data.StartWrite( );
                    data.WriteInt( 42 );
                    data.WriteString(th);
                    data.SendStream( player );
                }
}
}
}

 function onTimeChange(oldHour, oldMin, newHour, newMin)
{
switch( newMin )
{
case 0:
Thirst( );
break;
case 10:
Thirst( );
break;
case 20:
case 30:
case 40:
case 50:
Thirst( );
break;
}
}
[/noae][/noae][/noae][/spoiler]

Client Side [spoiler]
[noae][noae] Thirstu <- 100;

Peace <-
{
Tbar = null
Tlabel = null
Th = 100
}

function Server::ServerData(stream)
{
 local StreamReadInt = stream.ReadInt(),
  StreamReadString = stream.ReadString();
 switch (StreamReadInt.tointeger())
 {
case 42: local data = StreamReadString; Dude(); ::Thirstu = StreamReadString.tofloat(); break;
}
}

function Dude(){
Peace.Tbar = GUIProgressBar();
 Peace.Tbar.Pos = VectorScreen( sX * 0.0, sY*0.0 );
 Peace.Tbar.Size = VectorScreen( sX * 0.08, sY * 0.025 );
 Peace.Tbar.StartColour = Colour( 40, 255, 40 );
 Peace.Tbar.EndColour = Colour( 180, 110, 110 );
 Peace.Tbar.MaxValue = 100;
 Peace.Tbar.BackgroundShade = 0.3;
 Peace.Tbar.Thickness = 2;
 
 Peace.Tlabel = GUILabel( );
 Peace.Tlabel.Text = "Thirst";
 Peace.Tlabel.Pos = VectorScreen( sX * 0.0, sY*-0.01 );
 Peace.Tlabel.FontSize = 24;
 Peace.Tlabel.FontName = "Squada One";

 Peace.Tlabel.TextColour = Colour( 255, 255, 255 );
 Peace.Tbar.AddChild( Peace.Tlabel );


  Peace.Tbar.Value = ::Thirstu;
Peace.Th = ::Thirstu;
Peace.Tlabel.Text = "Thirst";
Peace.Tlabel.FontSize = 12;
Peace.Tlabel.FontName = "Squada One";

}
[/noae][/noae][/noae][/spoiler]

Have a nice day

There video gooo
https://www.youtube.com/watch?v=1vP4Q74Xe9c

Contact: Harun | KrOoB#2057
Test Server : 80.253.245.58:8191
#56
Support / Re: Did u tell me this
Feb 22, 2020, 10:33 PM
if u have DMZ option on your modem, turn on it and choose your pc. Then start your server

if u don't have DMZ option

Quote from: MEGAMIND on Feb 21, 2020, 03:02 PM
Quote from: habi on Feb 17, 2020, 02:17 PMgoogle how to port forward
then check eg. https://www.canyouseeme.org/     port 8192

the server which runs on your computer sends data to internet through 8192 port, and if it is 'not port forwarded', the data will not reach internet and no people over internet can see the server.

https://www.youtube.com/watch?v=7FqbZBwN_Lg
#57
most of scripter left bro (me2) :( just server owners staying now
#58
Script Showroom / KrOoB Server Script (OLD)
Nov 20, 2019, 12:15 PM
HI GUYS

I made the server script in tdm mode. The register system belongs to Mohamed & Car System belongs to KrlozZ, there are more than one script in it, and I thank them also


Commands

Player Commands : /nakityolla (givecash) |  /arabalarim (mycars) | /araba (getcar) | /surucu (driver) | /abilgi (carinfo) | /sat (sellcar) | /satinal (buycar) | /ilac (heal) | /yelek (armour) |  /istatistik (stats) | /sifredegis (changepass) | /cikis (logout) | /kayit (register) | /giris (login) | /yatir (deposit) | /cek (withdraw) | /raporla (report) | /banka (bank money) | /kural (rules) | /komutlar (commands) | /akomut (carcommands) | /silahlar (guns) | /a (anims) | /izle (spectate) | /izleme (leavespec) | /spree | /myspree | /arena |  /sarhos (drunk) | /ayik (notdrunk) | /tamir (fix) | /mypos || uhfff bro i'm tired

Admin Commands: /olumsuz (immortal baby :)) | /olumsuz (mortal) | /duyuru (announce) | /skin | /raporlistesi (reportlist) | /weather | /settime | /erit (unfreeze) | /dondur (freeze) |  /setarmour |  /kick | /setowner | /ban | /removecar | /addcar | /changepos | /changecol | /sethp

MODE = TDM

MADED BY KrOoB (Old Nick H4F)


INFORMATION

Buying / selling cars | reporting system | login system | ban / kick system | and customized weapons & cars, character skins and locations are set



DOWNLOAD



IF YOU DOWNLOAD MY SCRIPT THANKS BRO :)
IF YOU LIKE THIS POST THANKS BRO :)


IF IT'S GETTING ERROR COME PM OR DISCORD (Harun | KrOoB#1216)
#59
Quote from: Sebastian on Jul 29, 2019, 11:06 PMIdk why, but this snippet made me smile, in the good way. :)

Because fresh meattt :-X :-X ;D
#60
Support / Re: [HELP]Timer sound
Jul 31, 2019, 05:57 PM
Quote from: Doom_Kill3R on Jul 31, 2019, 05:27 AM
Quote from: KrooB on Jul 31, 2019, 12:48 AMyou can edit your sound and you can make it 1second you don't have to script it
Bad advice.

as u wish but it's same thing ;D ;D