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

Topics - [VSS]Shawn

#1
Scripting and Server Management / Shooter
Jul 26, 2015, 02:31 PM
as i was making shooter but 1 problem came in a way that i am using if one player remain in shooter then the pickup create but not work i m making it on race system of ksna that is code

function startrace2()
{
 if ( democount == 1 ) CreatePickup( 384, Vector( -1761.91, -220.306, 14.8683 ) );
}
#2
General Discussion / Against Rule
Jul 26, 2015, 01:26 PM
Whenever i release any snippet thijn u lock it and give reason u didnt take permission from the owner of snippet if this is reason then see these topics also
http://forum.vc-mp.org/?topic=21.msg5869#new
http://forum.vc-mp.org/?topic=858.0
http://forum.vc-mp.org/?topic=283.0

Now say
#3
Snippet Showroom / Robbing System
Jul 26, 2015, 10:24 AM
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
   
#4
Scripting and Server Management / Shooter ;D
Jul 26, 2015, 07:12 AM
well i am creating shooter event like in E-G I complete that just one thing remain How car shoot like in E-G in Shooter Mode?
#5
Snippet Showroom / Veh and DelVeh
Jul 25, 2015, 10:55 AM
Hello guyz i am releasing Spawn vehicle and delete it
it is not maden by me

Credits: I dont know

- code removed -
#6
Hello i m using your race system i make maze system of your race system as my 1 to 4 vehs are Infernus and 81 to 84 are Pcj i tired to use this On maze cmd

FindVehicle( 81 ).Pos = Vector( new vectors as i add );
But when i joinmaze i sit in vehicle id 1 but in cmd it was 81 and its vector are also wrong

Problem?
#7
Snippet Showroom / KD with Criminal Rank
Jul 22, 2015, 07:04 AM
Hello Guys Today I am releasing Criminal Rank system with KD ( kills and death ) system for database

I have seen many players using used scripts so this is for player who start scripting from blank server
Just Add this

function OnScriptLoad()
{
CreateKD();
}
function onPlayerKill( killer, killed, weapon, bodypart ) // always check killed or player
{
SetKills(killer,GetKills(killer)+1);
SetDeaths(killed,GetDeaths(killed)+1);
}
function onPlayerTeamKill( killer, killed, weapon, bodypart )
{
onPlayerKill( killer, killed, weapon, bodypart );
}
function onPlayerDeath( player, reason )
{
SetDeaths(player,GetDeaths(player)+1);
}


this on Functions.nut

function CreateKD()
{
QuerySQL( db, "CREATE TABLE IF NOT EXISTS KD( Name VARCHAR(32),Kills INT(15) ,Deaths INT(15) )" );
}

function SetKills( player, amount )
{
      QuerySQL(db, "UPDATE KD SET Kills='" +  amount + "' WHERE Name='" + player.Name + "'");   
}

function SetDeaths( player, amount )
{
      QuerySQL(db, "UPDATE KD SET Deaths='" +  amount + "' WHERE Name='" + player.Name + "'");   
}

function GetKills( player )
{
   local kille =  GetSQLColumnData( QuerySQL( db, "SELECT Kills FROM KD WHERE Name='" + player.Name+"'" ), 0 );
   if ( kille ) return kille;
   else return 0;
}

function GetDeaths( player )
{
   local deaths =  GetSQLColumnData( QuerySQL( db, "SELECT Deaths FROM KD WHERE Name='" + player.Name+"'" ), 0 );
   if ( deaths ) return deaths;
   else return 0;
}

function Register( player, password )
{
QuerySQL( db, "INSERT INTO KD ( Name,Kills,Deaths) VALUES ( '" + player.Name +"','0','0' )" );
}

Now Criminal System

function GetCriminalRank( player )
{
local Criminalskillz=GetKills(player),a;
if(Criminalskillz<=10)
{
a="Newbie";
return a;
}
else if(Criminalskillz<=30)
{
a="Junior One";
return a;
}
else if(Criminalskillz<=60)
{
a="Medium One";
return a;
}
else if(Criminalskillz<=200)
{
a="Vandal";
return a;
}
else if(Criminalskillz<=300)
{
a="Full Member";
return a;
}
else if(Criminalskillz<360)
{
a="Hero Member";
return a;
}
else if(Criminalskillz<=400)
{
a="Dmear";
return a;
}
else if(Criminalskillz<=499)
{
a="Hustler";
return a;
}
else if(Criminalskillz<=600)
{
a="Assasin";
return a;
}
else if(Criminalskillz<=650)
{
a="PRO";
return a;
}
else if(Criminalskillz<=700)
{
a="Master";
return a;
}
else if(Criminalskillz<800)
{
a="Slavest";
return a;
}
else if(Criminalskillz<=900)
{
a="Boss";
return a;
}
else if(Criminalskillz<=1000)
{
a="Don";
return a;
}
else if(Criminalskillz<=1350)
{
a="Godfather";
return a;
}

return 0;
}
Now Work on Commands

Make Stats Command Your self

else if ( cmd == "rank" )
{
ClientMessage ( player.Name + "'s criminal rank is: " +GetCriminalRank(player)+ "." ,player,255,255,0);
}
#8
Hello Last time Kakan say u didn't made any snippet :( but i want to release one of them Its is almost maden by me but Mashreq help me in Query

Creater: Shawn
Helper: Mashreq


Well it works perfect in Vccnr but u can even change and add your query if u are using any other script

Add it on Commands

if(cmd=="vhm")
    { 
   //your admin level function
      else if ( !text) MessagePlayer( "/vhm <Vehicle-Model>.", player );
   else if ( VhmActive == true ) MessagePlayer( "Vehicle Minute is already active.", player );
{
           local q = QuerySQL( db, "SELECT Cost,Name FROM VehicleCost WHERE rowid LIKE '"+text+"'");
      local Cost = QuerySQL( db, "SELECT Cost FROM VehicleCost WHERE rowid LIKE '"+text+"'");
            Message("Happy one minute has started!");
   NewTimer( "stop",60000, 1, text );
           local changing=  QuerySQL( db, "UPDATE VehicleCost SET Cost='10000' WHERE Name='" + text + "'" );  // add your one if not similiar
   EchoMessage( ICOL_RED + "Happy one minute for car started." );
  VhmActive = true
    Message("[#FF0000]Vehicle "+text+" [#FFF000]is now for just 000 hurry up before it [#FFFFFF]expires, the offer is available for only one minute!");
FreeSQLQuery(changing);

}   

Functions....

function stop(text)
{
local restoring = QuerySQL( db, "UPDATE VehicleCost SET Cost='900000' WHERE Name='" + text + "'" ); // your query
Message( "[#FF0000]Vehicle " + text + " Ammount has been exceeded" );
VhmActive= false;
FreeSQLQuery(restoring);
}

on Main.nut ...

onScriptLoad()
{
VhmActive <- false;
}

And Functions Again....


Enjoy if don't work Pm me ;)


Code Updated .. Thanks Beztone
#9
Well I ask my one friend for wwe ring map >:( Name : ??? He Better Knows

So My One Friend Ask me Add Wwe superstar Like John Cena etc so is there any way to add custom skins?
#10
Scripting and Server Management / Stats
Jul 12, 2015, 11:16 AM
hello again i am facing one problem i am using hashes script i use this function onplayerkill and on playerdeath

HInc( "Kills", killer.Name );
 HInc( "Deaths", player.Name );

but when i kill someone first time my kills become1 when i kill again kills remain 1 same problem with deaths
#11
Scripting and Server Management / Custom cars
Jul 12, 2015, 10:58 AM
Well i have added some custom car but when i sit in my car and type /car it show

ID[ blah ] Name[ Null ] Cost [ null ]

Is there any way to block the custom car i mean custom cars does not show on /car cmd
if i type /car im in custom car its say
Car is Owned By Server
#12
Hello Guys well i was making happy car minute for my server but i m unable to make it

This is irc command I made it little bit but problem is that database does not updated You can see the code


if(cmd=="!vhm")
{
  local q = QuerySQL( db, "SELECT Cost,Name FROM VehicleCost WHERE rowid LIKE '"+text+"'");
  local Cost = QuerySQL( db, "SELECT Cost FROM VehicleCost WHERE rowid LIKE '"+text+"'");
  if ( !text ) EchoMessage( ICOL_RED + "!vhm <infernus/hotring>." );
  else if ( level <= 3 )  EchoMessage( ICOL_GREEN + "Insufficient Level" );
else if ( text == "Infernus" )
{
            EMessage("Happy one minute has started!");
            QuerySQL( db, "UPDATE VehicleCost SET Cost='10000' WHERE rowid LIKE '" + text + "'" );
EchoMessage( ICOL_RED + "Happy one minute for car started." );
EchoMessage( ICOL_RED + "Vehicle Infernus is now for just $10000 hurry up before it expires, the offer is available for only one minute!");
EMessage("Vehicle Infernus is now for just $10000 hurry up before it expires, the offer is available for only one minute!");
}
else if ( text == "Hotring Racer #2" )
{
EMessage("Happy one minute has started!");
            QuerySQL( db, "UPDATE VehicleCost SET Cost='10000' where rowid like '"+text+"'" );
EchoMessage( ICOL_RED + "Happy one minute for car started." );
EchoMessage( ICOL_RED + "Vehicle Hotring Race #2 is now for just $10000 hurry up before it expires, the offer is available for only one minute!");
EMessage("Vehicle Hotring Racer #2 is now for just $10000 hurry up before it expires, the offer is available for only one minute!");
}

:\
#13
Scripting and Server Management / tointeger
Jul 11, 2015, 05:18 PM
hello i am facing problem i was converting script it works correctly then i was adding some extra function and then i dont know what is error this always come on playerspawn

the index tointeger does not exist
#14
Scripting and Server Management / Crashed
Jul 11, 2015, 10:18 AM
I don't know what the hell When ever i open my server and go to join it there the error come Crash with address and then i cant spawn any solution ?
#15
Scripting and Server Management / basics
Jul 10, 2015, 11:32 AM
well i have added this on my binfo
registered = false;
logged = false;

and add this on pickuppickup

if ( binfo[ player.ID ].logged == false ) msg

but when i pickup the pickup it say in console error index registered or logged does not exist why?
#16
Scripting and Server Management / CUff Key
Jul 03, 2015, 08:30 PM
Hello friends i am facing one problem i have this bind key of cuff when ever y press left shift it say u must be near to a wanted player but when i goto near wanted level it still say you need to be near wanted level player

Solution?


if ( key == LShift )
{
if(GetJob(player)==2)
                {
                    local b = 0,plr;
                    foreach(a,val in players)
                    {
                        plr= FindPlayer( players[a].tointeger() );
                        if(plr)
                        {   
                        if ( binfo[plr.ID].logged==true )
                        {
                            if(GetPlayerDistance(player,plr) <= 3)
                            {
                                if(GetWantedLevel(plr)>0)
                                {
                                   
                                    if(pinfo[plr.ID].taze.tointeger() ==1){ b++; ClientMessage ( "> "+plr.Name+" is already cuffed.",player,255,255,0); }
                                        else if (pinfo[plr.ID].robbing ==1) ClientMessage ( "Error - You cannot cuff a player while he/she is robbing a store.", player,255,255,0);
                                        else if(pinfo[plr.ID].jailed==1) ClientMessage ( "> "+plr.Name+" is in jail.",player,255,255,0);
                                        else if(plr.Vehicle) ClientMessage ( "> "+plr.Name+" is in a vehicle.",player,255,255,0);
                                        else if(pinfo[plr.ID].breakcuff==1) ClientMessage ( "> "+plr.Name+" just broke the cuffs, you cannot cuff him upto 10 seconds after he broke the cuffs.",player,255,255,0);

                                        else
                                        {
                                            ClientMessage ( "Cuffed [ "+plr.Name+" ], now you can use / arrest to send him/her to the jail.",player,255,255,0);
                                            ClientMessage ( "Officer "+player.Name+" has cuffed you. ",plr,255,255,0);
                                            pinfo[plr.ID].taze=1;
                                            plr.IsFrozen = true;
                                            d <- NewTimer( "cuffanim", 100, 230, plr.ID);
                                            c <- NewTimer( "anticuffabuse", 30000 , 1, plr.ID);
                                            print (c);
                                            cuffff.push(plr.ID);
                                            cufffff.push(c);
                                            animcufff.push(d);
                                        }
                                }
                            }
                        }
                        }
                       
                    }
                    if(b==0) ClientMessage ( "You need to be near to a wanted player to cuff him/her.",player,255,255,0);
                }
}
#17
Scripting and Server Management / Ping
Jul 03, 2015, 07:29 AM
Hello Friends When ever in my server 10 + players come game get lags is there any solution that there would be low ping?
#18
Scripting and Server Management / LoadPIckups
Jun 27, 2015, 08:55 AM
Hello :D

I am facing one problem i dont know what is error i add many rows like this in db

5890 Cherry Popper 30000000 None None 407 -864.17883 -572.18151 11.10813
80000 Warehouse 40000000 None None 407 -692.734 -1577.16 12.544
30000 Bank 100000000 None None 407 -894.08514 -341.23468 13.47533
1000 Biker Bar 35000000 None None 407 -597.53094 652.93548 11.07121
4000 Pizza Shop 25000000 None None 407 -882.35906 796.40411 11.10740
4500 Junk Yard 45000000 None None 407 -1054.90014 319.43301 11.26303
2500 Kaufman Cabs 65000000 None None 407 -1012.16070 199.37254 11.26526
1900 Print works 55000000 None None 407 -1058.45178 -261.43157 11.44641
2000 Sunshine Autos 70000000 None None 407 -1010.82250 -871.11132 13.05085
2300 Cherry Popper 75000000 None None 407 491.23086 -79.93425 11.48376
1950 Cherry Popper 200000 None None 408 -884.30242 -578.26556 15.05117
3000 Pizza House 200000 None None 408 -908.00854 798.34558 11.41105

and add this function
function LoadPickups()
{
local query = QuerySQL( db, "SELECT Pos FROM Properties" ),splitPos, x, y, z ,cpType;   
if( query )
{
while( GetSQLColumnData( query, 0 ) != null )
{
splitPos = split( GetSQLColumnData( query, 0 ), " " );
x = splitPos[ 1 ];
y = splitPos[ 2 ];
z = splitPos[ 3 ];
cpType = splitPos[ 0 ];
CreatePickup( cpType.tointeger(), Vector( x.tofloat(), y.tofloat(), z.tofloat() ) );
GetSQLNextRow( query );
}
CreatePickup( 380,Vector(-65.0178,-1482.7504,11.4940));
CreatePickup( 380,Vector(362.1243,1061.6443,19.2101));
CreatePickup( 380,Vector(-675.0,1204.6,11.0));
CreatePickup( 508,Vector(367.127,-473.099,13.8172));
CreatePickup( 380,Vector(201.7,-471.1,11.1));

}
FreeSQLQuery( query );
}

and add this in OnScriptLoad

NewTimer( "LoadPickups", 5000, 1 );
but when i rob any place it does not give correct name like if i rob Cherry Popper it say u rob Pizza shop or something
What is Problem?
#19
Hello Again
I add jail system which jail player for 120 seconds only
i wanna know how can i add a announcement which show player how much time remain for unjail like if 22 seconds remain it show in announce Time Left 22 Sec
How can i do this?
#20
Scripting and Server Management / WantedLevel
Jun 26, 2015, 03:41 PM
Hello Friends i am making Roleplay server but i am facing problem I have WantedLevel Row in Table of Accounts i add this onPickupPickup
pinfo[ player.ID ].WantedLevel ++;
QuerySQL( db, "UPDATE Accounts SET WantedLevel= '" + pinfo[ player.ID ].WantedLevel + "' WHERE Name='" + player.Name.tolower() + "'" );
SetWantedLevel(player,GetWantedLevel(player)+10);
But when i rob store it give me robskills but not give me wantedlevel
What is Problem?