Robbing System

Started by [VSS]Shawn, Jul 26, 2015, 10:24 AM

Previous topic - Next topic

[VSS]Shawn

Hello Fella I am today releasing Robbing System for any server it quit Easy Just add these things

Credits : Ksna Random Cash Robbing

First Add on Commands

function onPlayerCommand( player, cmd, text )
{
if ( cmd == "robskills" )
{
MessagePlayer( "[#FF0000] Your robbing skill are: " + GetRob(player) + "." ,player );
}
}
   
   Now Work On Functions
   
   Add this on ScriptLoad
   RobieCopie();
Loade();
stats <- array(GetMaxPlayers(), null);
randomrob <- [ 50000, 10000, 15120, 220300, 25100, 350006, 355100, 403200 ];
   
   now on Functions.nut
   
   
   function RobieCopie()
{
QuerySQL( db, "CREATE TABLE IF NOT EXISTS Rob&Cop( Name TEXT),Robskill NUMERIC )" );
}
function GetRob( player )
{
   local Robie =  GetSQLColumnData( QuerySQL( db, "SELECT Robskills FROM Rob&Cop WHERE Name='" + player.Name+"'" ), 0 );
   if ( Robie ) return Robie;
   else return 0;
}
function SetRob( player, rob )
{
      QuerySQL(db, "UPDATE Rob&Cop SET Robskill='" +  rob.tointeger() + "' WHERE Name='" + player.Name + "'");   
}
   
   
   on PlayerClass
    Robskill = 0;
Cash = 0;
   
   Now Lets Move to PickupPickup
   
   function onPickupPickedUp( player, pickup )
{
if ( pickup.Model == 408 )
  {
Message("[#FF0000]"+ player.Name +" has Robbing the "+ GetDistrictName( player.Pos.x, player.Pos.y ) +"");
SetRob(player,GetRob(player)+1);
local a = randomrob[rand()% randomrob.len()]
stats[ player.ID ].cash = stats[ player.ID ].cash + a ;
Announce( "~y~ You have Robbed :"+ a +"", player )
player.Cash = stats[ player.ID ].cash;
pickup.RespawnTime = 30000;
}
}
   
   Now CreatePickups
   
    function Loade()
{
CreatePickup(508, Vector( 390.96, -506.26, 9.39 ));
CreatePickup(408, Vector( 204.29, -490.98, 11.06 ));
CreatePickup(408, Vector(-854.526, -631.75, 11.3756 ));
CreatePickup(408, Vector(-688.706, -1262.49, 16.3473 ));
CreatePickup(408, Vector(-665.025, -1484.42, 13.8016 ));
CreatePickup(408, Vector(-885.324, -469.998, 13.1111 ));
CreatePickup(408, Vector(-847.002, -71.6495, 11.5405 ));
CreatePickup(408, Vector(-1079.64, -275.416, 12.0882 ));
CreatePickup(408, Vector(-1036.4 81.2033, 11.6515 ));
CreatePickup(408, Vector(-992.73, 200.392, 15.2213 ));
CreatePickup(408, Vector(-830.158, 741.534, 11.2885 ));
CreatePickup(408, Vector(-906.182, 799.715, 11.4546 ));
CreatePickup(408, Vector(-854.047, 85 11.3846 ));
CreatePickup(408, Vector(-754.53, 1342.74, 11.767 ));
CreatePickup(408, Vector(472.16, 1009.2, 19.1493 ));
CreatePickup(408, Vector(423.496, 1039.0 18.9648 ));
CreatePickup(408, Vector(364.464, 1075.12, 19.0649 ));
CreatePickup(408, Vector(470.443, 1208.18, 19.0094 ));
}
   
   Enjoy ;)

If you find any bug feel free to post or pm me
   

NE.DiamondBlue

Without the permisssion of owner ksna, he took this from ksna's cops and robbers
NE.CrystalBlue is a very great person.

Quoteit does not mattter that his name is not under vcmp developers but i hope his name will come as he is a great scripter, works hards, help others, hnot selfish

[VSS]Shawn

gtfo I just add his random cash System not the whole function

KAKAN

then why u didn't edit the array as well?
It shows that YOU have ROBBED this snip from KSNA, that's why the topic name and the snips are named as "Robs"
oh no

[VSS]Shawn

oh yaar wtf didn't u know i just use his random cash function not the whole fucking function got it now leave

Thijn

Locked before this turns into another flaming war.