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_

#31
Quote from: habi on Aug 12, 2020, 04:14 PMIdea: Since there are many cop's parking, i think some other parking space is being hidden. By looking at the co-ordinates, i have a feeling that the object you are trying to hide is little ahead (north) of where you are standing.

what you say?
i don't think so, co-ordinates are correct i tried before mine and murdock's. ( there is no co-ordinates except them they must be the correct one cuz i can hide other objects with same way )
u can try also
#32
Quote from: GTA-Cheng on Aug 12, 2020, 02:40 PMHello, how do robots work in other worlds?

i think you are trying to set bot's world, just find bot with FindPlayer then set his world
example,
if ( cmd == "changeworld" )
{
local plr = FindPlayer(Your ro-bots' nick or id);
plr.World = 512;
}
#33
Quote from: Murdock on Aug 11, 2020, 07:49 PMTry using the coordinates as defined in downtows.ipl itself
// 1815, dts_cop_park, 0, -637.277771, 834.3309326, 12.42084503, 1, 1, 1, 0, 0, 0, 1
HideMapObject(1815, -637.277771, 834.3309326, 12.42084503)
i placed the code
HideMapObject(1815, -637.277771, 834.3309326, 12.42084503) but still here :D
#34
i tried to hide this object from map but i couldn't why ? (i can hide other map objects)
code;     HideMapObject(1815,-637.278, 834.331, 12.4208)SS
#35
Community Plugins / Re: Discord Plugin
Aug 07, 2020, 10:54 PM
if we can move player to another channel on discord with this plugin, we are able to make a basic phone call system like moving player and other player (who is calling) to a private voice channel and they speak blah blah.
 am i right ?
#36
Support / Re: I need vehicle Part ID code
Aug 02, 2020, 03:10 PM

probably same but there it's
webarchive
#37
Script Showroom / Re: Auto Mute System
Jul 30, 2020, 10:17 PM
bruhh, gj anyway
#38
simple but good :clap:
better next one :)
#39
very useful good job bruh :clap:
#40
Script Showroom / Re: Let's Rob Some Bank ?
Jul 19, 2020, 12:36 PM
and you have 2 chance to done this, after 2 miss it still continues but in the end you get 0 money :D
#41
Script Showroom / Re: Let's Rob Some Bank ?
Jul 19, 2020, 12:31 PM
Quote from: Sebastian on Jul 19, 2020, 12:26 PMI like the way you see things.
Yes,  vcmp needs such interactive things.

Btw,  what happens when you don't press the buttons you see?
Bar value decrease,         Robbery.time equals to 1 and if u don't press button you see it increase 1
[code]Robbery.tBar.Value -= 5 * Robbery.times;
#42
Script Showroom / Let's Rob Some Bank ?
Jul 19, 2020, 12:09 PM
It's a rob script with a little game :D I just think that while robing a bank or somewhere else it's kind a boring because we're doing nothing so i add a little something like a game good luck <3 ;D


If you see bugs or error please notice ( tried 3 times )

Thanks to ysc3839 for Timers <3


Server Side

[noae][noae]function onScriptLoad()
{
Rob <- array( GetMaxPlayers(), true);
  teleport <- array(GetMaxPlayers(),0);
   BankRob <- CreateCheckpoint(null, 0, true, Vector(-942.61, -343.512, 7.22693), RGB(255, 0, 200), 2.0);
CreateCheckpoint(null, 0, true, Vector(-939.282, -351.561, 7.22692), RGB(0, 0, 200), 1.0);
  CreateCheckpoint(null, 0, true, Vector( -938.388, -351.363, 17.8038), RGB(0, 0, 200), 2.0);

VK_LEFT <- BindKey(true, 0x25, 0, 0);
VK_RIGHT <- BindKey(true, 0x27, 0, 0);
VK_UP <- BindKey(true, 0x26, 0, 0);
VK_DOWN <- BindKey(true, 0x28, 0, 0);
ENTER <- BindKey(true, 0x0D, 0, 0);
I_KEY <- BindKey(true, 0x49, 0, 0);
}

function onClientScriptData( player )
{
  local int = Stream.ReadInt( ),
string = Stream.ReadString ( );
  switch( int )
{
case 1:
player.Cash += 10000;
Message("[#eeeeee]"+ player.Name +" has been robbed a bank, Last seen at "+ GetDistrictName( player.Pos.x, player.Pos.y ) +". All cops requested to arrest him!");
player.IsFrozen = false;
break;
case 2:
player.Cash += 1;
player.IsFrozen = false;
Message("[#eeeeee]"+ player.Name +" tried to rob a bank, Last seen at "+ GetDistrictName( player.Pos.x, player.Pos.y ) +". All cops requested to arrest him!");
}
}


function onCheckpointEntered( player, checkpoint )
{
teleport[player.ID] = checkpoint.ID;
teleport[player.ID] += 1;
print(teleport[player.ID]);
}

function onCheckpointExited( player, checkpoint )
{
teleport[player.ID] = 99;
}


function onKeyUp( player, key )
{
    if (key == ENTER)
    {
switch(teleport[player.ID])
{
case 1:
if ( Rob[player.ID] == true )
{
Stream.StartWrite( );
Stream.WriteInt( 10 );
Stream.SendStream( player );
Rob[player.ID] = false;
player.IsFrozen = true;
local check = FindCheckpoint(0);
check.Remove();
}else
{
Message("You can't rob rn");
}
break;
case 2:
                    player.Pos = Vector(-939.282, -351.561, 17.22692);
break;
case 3:
                    player.Pos = Vector(-938.388, -351.363, 7.8038);
break;
}
}
if ( key == VK_LEFT)
{
    Stream.StartWrite()
  Stream.WriteInt(2)
  Stream.WriteString("left")
  Stream.SendStream(player)
}
if ( key == VK_RIGHT)
{
    Stream.StartWrite()
  Stream.WriteInt(2)
  Stream.WriteString("right")
  Stream.SendStream(player)
}
if ( key == VK_UP)
{
    Stream.StartWrite()
  Stream.WriteInt(2)
  Stream.WriteString("upper")
  Stream.SendStream(player)
}
if ( key == VK_DOWN)
{
    Stream.StartWrite()
  Stream.WriteInt(2)
  Stream.WriteString("down")
  Stream.SendStream(player)
}
}

[/noae][/noae]


Client Side
[noae][noae]
Timer <- {
 Timers = {}

 function Create(environment, listener, interval, repeat, ...)
 {
 // Prepare the arguments pack
 vargv.insert(0, environment);

 // Store timer information into a table
 local TimerInfo = {
 Environment = environment,
 Listener = listener,
 Interval = interval,
 Repeat = repeat,
 Args = vargv,
 LastCall = Script.GetTicks(),
 CallCount = 0
 };

 local hash = split(TimerInfo.tostring(), ":")[1].slice(3, -1).tointeger(16);

 // Store the timer information
 Timers.rawset(hash, TimerInfo);

 // Return the hash that identifies this timer
 return hash;
 }

 function Destroy(hash)
 {
 // See if the specified timer exists
 if (Timers.rawin(hash))
 {
 // Remove the timer information
 Timers.rawdelete(hash);
 }
 }

 function Exists(hash)
 {
 // See if the specified timer exists
 return Timers.rawin(hash);
 }

 function Fetch(hash)
 {
 // Return the timer information
 return Timers.rawget(hash);
 }

 function Clear()
 {
 // Clear existing timers
 Timers.clear();
 }

 function Process()
 {
 local CurrTime = Script.GetTicks();
 foreach (hash, tm in Timers)
 {
 if (tm != null)
 {
 if (CurrTime - tm.LastCall >= tm.Interval)
 {
 tm.CallCount++;
 tm.LastCall = CurrTime;

 tm.Listener.pacall(tm.Args);

 if (tm.Repeat != 0 && tm.CallCount >= tm.Repeat)
 Timers.rawdelete(hash);
 }
 }
 }
 }
};

sX <- GUI.GetScreenSize().X;
sY <- GUI.GetScreenSize().Y;

    Robbery<-
    {
    Window = null
    tBar = null
        times = 0
    }

ScreenS <-
{
    sprite = null
}
 keys <-
 {
     stat = false
 }   

      alt <- false;
     upper <- false;
     right <- false;
     left <- false;
     tus <- null;
     keyf <- null;

   gmode <- ["right", "left", "down", "upper"]
//-------------------------------------------------------------------


function rander()
{   
    ::keyf = gmode[rand()% gmode.len()];
    if( keys.stat == false )
    {
    ::tus = null;
    Timer.Create( this, verifa, 1000, 1 );
    Sprites <- Timer.Create( this, KeySprites, 0.1, 1 );
    }
}

function KeySprites()
{
    if ( ::keyf == "down" )
    {
 ScreenS.sprite <- GUISprite("assagi.png", VectorScreen(sX * 0.30, sY * 0.30));
  ScreenS.sprite.Size = VectorScreen(250, 250);
  }
    if ( ::keyf == "upper" )
    {
 ScreenS.sprite <- GUISprite("yukari.png", VectorScreen(sX * 0.30, sY * 0.30));
  ScreenS.sprite.Size = VectorScreen(250, 250);
  }
      if ( ::keyf == "left" )
    {
 ScreenS.sprite <- GUISprite("sol.png", VectorScreen(sX * 0.30, sY * 0.30));
  ScreenS.sprite.Size = VectorScreen(250, 250);
  }
      if ( ::keyf == "right" )
    {
 ScreenS.sprite <- GUISprite("sag.png", VectorScreen(sX * 0.30, sY * 0.30));
  ScreenS.sprite.Size = VectorScreen(250, 250);
  }
}

function verifa()
{
    if( keyf == ::tus)
    {
        keys.stat = false;
        ScreenS.sprite = null;
    }else
    {
        Robbery.times += 1;
        Robbery.tBar.Value -= 5 * Robbery.times;
        keys.stat = false;
        ScreenS.sprite = null;
    }
}

function Script::ScriptProcess()
{
    Timer.Process();
}

function Server::ServerData( stream )
{
 local StreamReadInt = stream.ReadInt(),
  StreamReadString = stream.ReadString();
 switch (StreamReadInt.tointeger())
 {
                case 2: local data = StreamReadString; if ( StreamReadString ){ ::tus = StreamReadString; } break;
          case 10: Criminal( ); break;
     default: break;
 }
}

function Criminal( )
{
    Robbery.Window = GUIWindow(VectorScreen(sX * 0.35, sY * 0.75), VectorScreen(sX * 0.4, sY * 0.123), Colour(20, 20, 20, 200), "HAK YEDIN HACK YICEKSIN YAKINDA", GUI_FLAG_TEXT_TAGS);
    Robbery.Window.AddFlags(GUI_FLAG_VISIBLE);
    Robbery.Window.RemoveFlags(GUI_FLAG_DRAGGABLE | GUI_FLAG_WINDOW_CLOSEBTN | GUI_FLAG_WINDOW_RESIZABLE);

         Robbery.tBar = GUIProgressBar();
 Robbery.tBar.Pos = VectorScreen(sX * 0.005, sY * 0.0015);
 Robbery.tBar.Size = VectorScreen( sX * 0.39, sY * 0.064 );
 Robbery.tBar.StartColour = Colour( 40, 255, 40 );
 Robbery.tBar.EndColour = Colour( 180, 110, 110 );
 Robbery.tBar.MaxValue = 100;
  Robbery.tBar.Value = 0;
 Robbery.tBar.BackgroundShade = 0.3;
 Robbery.tBar.Thickness = 2;
  Robbery.Window.AddChild(Robbery.tBar);
        Ilerleme <- Timer.Create( this, progressing, 2000, 21 );
        Sallama <- Timer.Create( this, rander, 5000, 8 );
        Check <- Timer.Create( this, Checking, 43000, 1 );
}

function progressing()
{

Robbery.tBar.Value += 5;
Conlefte.Print(Robbery.tBar.Value);
 
}
function Checking()
{
    if ( Robbery.tBar.Value >= 100 )
    {
        ScreenS.sprite = null;
        Timer.Destroy( Ilerleme );
        Timer.Destroy( Sallama );
        Robbery.Window = null;
        local Datas = Stream();
Datas.WriteInt(1);
Server.SendData(Datas);
    }
    if ( Robbery.tBar.Value < 100 )
    {
        Timer.Destroy( Ilerleme );
        Timer.Destroy( Sallama );
        Robbery.Window = null;
        local Datas = Stream();
    Datas.WriteInt(2);
Server.SendData(Datas);       
    }
}
function GUI::GameResize( width, height )
{
        if (Robbery.Window)
    {
    Robbery.Window.Pos = VectorScreen(sX * 0.35, sY * 0.75);
    Robbery.Window.Size = VectorScreen(sX * 0.4, sY * 0.123);

    Robbery.tBar.Pos = VectorScreen(sX * 0.005, sY * 0.0015);
    Robbery.tBar.Size = VectorScreen(sX * 0.39, sY * 0.064);
    }
}

seterrorhandler(errorHandling);
[/noae][/noae]
#43
it's just amazing bruh :thumbsup: :perfect:
very simple very easy
#44
@KadirYigit better late than never, good job :))
#45
Quote from: Sebastian on Jul 13, 2020, 02:30 AMHard RPG in VCMP :D
PS: Pics ?
very hard :D
with this script panic hungery thirsty Fuel etc. can be done