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

#1
Specs:
HP Compaq 6005 Pro MT
AMD Phenom II X3 B77 3.20Ghz
8GB DDR3 1333Mhz Ram
WD 2TB 7200Rpm Sata Hdd
HP standard Psu 320w BTX
Gigabyte GTX 1050 2G D5
#2
First i am sorry for not captioning anything in tut

https://youtu.be/wpWmF_yerTw
#3
Off-Topic General / A Goodbye With Love
Aug 06, 2016, 07:48 PM
@. @DeViL_JiN @Doom_Kill3R @Stormeus @Thijn and some other friends. I really had a great time with you guys. But the time is come to say goodbye to you (from vcmp). Please forgive me if i'd said something wrong. I am gonna miss you guys :'(
#4
QuoteIf your release is an object, map, skin, or vehicle, it should go in the appropriate subboard. If your release doesn't neatly fit into one of those categories, it should be posted in this catch-all board instead.

If your release consists of content repackaged from other mods or modders, appropriate credit should be given, just as it would be given for something like a script release.

Releases without appropriate author credits will not be accepted and links will be removed

[b]Type (Map, Object, Skin, Vehicle, Weapon):[/b]
[b]Original author credits(along with website address):[/b]
[b]Further Edited By( if you edited the model, textures ):[/b]
[b]Download Link:[/b]
#5
Skin Showroom / Skins Collection
Mar 07, 2016, 04:04 PM
Here are the skins i've added in my server Grand Hunting Project

  • CJ skin From GTA SA by @VC_Guy
  • Batman Skin by @Dkpr1nce
  • Ironman Skin by @xskater8x
  • Spiderman skin by @JoteAmazing
  • Kyo Kusanagi skin by @Muhammad Hammad
(Actually this skin i've taken for my nick :P )




@Kusanagi pokes @KAKAN

#6
Vehicle Showroom / Kusanagi's Collection
Mar 07, 2016, 12:32 PM
I didn't included the modders credits because i downloaded these vehicles from many sites and i was searching them from months so i can't gather their names


Download

ScreenShots:
[spoiler]
















[/spoiler]

I Just Own Credits For Porting them to VCMP ( actually these all vehicles were made for GTASA)

Note: Topic is copy pasted from old
Edit: Screenshots Updated
#7
https://youtu.be/ypx04_V0f-I


I know its the wrost tut ever but it may help some new peoples
#8
I was learning from @sseebbyy's tut ( Detach an object from a group ) then i ported this from GTA SA :). i've also made a Speaker (from scratch) but that was too huge like a building because i dont know what are the correct sizes for objects they looks small in gmax and zmodeler even in dff viewer but they become huge in game..

Screens:






Collision file added
#9
Applications / Webhost
Jan 14, 2016, 06:58 PM
@Drake this is the One Last thing i want from you because i am tired of creating forums

User Name: Kusanagi
Subdomain: ghp
Email Address: [email protected]
Forum Software(Optional): SMF
Database: Mysql based
Extra note: i want you to give me phpmyadmin info if you aren't giving it to others because i want to replace my old database and i am also thinking to change my server database from SQLite to MySQL
#10
Q: is it good to use onTimeChange instead of an infinite timer for some function such as savestatsall(a function that save the stats of all players)?

I made something through onTimeChange and it works. Let me show what i made.

function onScriptLoad()
{
InfiniteTimer <-0;
InfiniteTimer = time() + 14; // just example i wrote on mobile but exact code is in pc so
}

function onTimeChange(oldHour, oldMin, newHour, newMin)
{
if ( time() > InfiniteTimer && InfiniteTimer !=null)
{
print(" we passed 15 secs and it works ");
// there we can use our function but for example i am using print and it prints after every 15secs
// to avoid repeating we can set InfiniteTimer = null  here

// to repeat we can set more time
// InfiniteTimer = time()+14;
}
}
Now please answer my question :)
#11
Servers / Grand Hunting Project
Nov 30, 2015, 12:05 AM

Server name: Grand hunting Project
IP: 51.255.193.118:5194
Forum:- GHP New Forum
IRC :- #GHP @ LUnet
Developer: Kusanagi
Forum Administrators: LeGenD_KiLLeR, Kusanagi


Short Story: A few months ago i've asked to FuriouS_KnighT(developer of ghp 0.3 server) about creating GHP in 0.4 he says he is not planning to do it he told you have full permission to create it if you want so i started working when i was on vication i've made much progress but i've gone lazy about it after comming back. now i've hosted this server on vps that is given by @S.L.C there will be bugs and script may cause lag because i didnt tested it much i will start to improving it now. if anyone wanna give a hand then welcome ( i am not talking about people like Finch. thus dont know a bit about scripting)...

On New VPS by @Drake



Edit(19-03-2016): IP Changed
#12
Script Showroom / Kusanagi's Property Script
Nov 14, 2015, 09:45 AM

Hello guys last night i made this script from scratch. It might not be useful but newbies and some of my friends needs it so, There are few commands.

/createprop : stand some where near of prop and use this command it will create an pickup on your standing postion and will put the data in props.sqlite.
Syntax:
/createprop <Price> <Prop Name>
Prop Name: put your desired property name here such as Vercitty State or Mansion.

Price: The price for property you want to set.

/buyprop
Syntax:
/buyprop <Property ID>
/sellprop
Syntax:
/sellprop <Property ID>
/shareprop
Syntax:
/shareprop <Property ID> <Player Name>
/unshareprop
Syntax:
/unshareprop <Property ID>
/myprops  /mysharedprops


Download Link: Dropbox Link Mediafire Link
Found Bugs or have Suggestion Please comment below

Update: Disconnecting db on onScriptUnload, Removed server.exe
Another Update: Added GetPlayer Function and using GetTok instead split and using escapeSQLString, Added PropertyID

Links updated


Plugins you need Windows x86, Linux x86
#13
First i will Thank to @Rocky and @Thijn for an useful function GetTimeFormat

I know it isn't hard to made for us but it would be really hard to made for newbies so i made it :)

Main.nut
onScriptLoad()
{
Start <-0;
Start = time();
}

Command:
if (cmd=="hoston")
{
local time_taken = time()-Start;
Message("Server Host Time "+GetTimeFormat(time_taken));
}

function GetTimeFormat( secs )
{
                local nDays, nHours, nMinutes, nMonths, nYears, nTime = "";
nYears = secs/31536000;
secs = secs%31536000;
nMonths = secs/2678400;
secs = secs%2678400;
nDays = secs/86400;
secs = secs%86400;
nHours = secs/3600;
secs = secs%3600;
nMinutes = secs/60;
secs = secs%60;
if( nYears != 0 ) nTime = nTime + nYears + " Year" + (nYears > 1 ? "s":"");
if( nMonths != 0 ) nTime = nTime + (nTime != "" ? ", ":"") + nMonths + " Month" + (nMonths > 1 ? "s":"");
if( nDays != 0 ) nTime = nTime  + (nTime != "" ? ", ":"") + nDays + " Day" + (nDays > 1 ? "s":"");
if( nHours != 0 ) nTime = nTime + (nTime != "" ? ", ":"") + nHours + " Hour" + (nHours > 1 ? "s":"");
if( nMinutes != 0 ) nTime = nTime +  (nTime != "" ? ", ":"") + nMinutes + " Minute" + (nMinutes > 1 ? "s":"");
if( secs != 0 ) nTime = nTime + (nTime != "" ? ", ":"") + secs + " Second" + (secs > 1 ? "s":"");
return nTime;
}

Update: Changed time() with GetTickCount()
#14
The topic name says all but i will explain a bit more. I wanna know that how we could save and instance such as player nicks in an array or table and after adding how to remove just an nick from the array or table
#15
i Got two errors one by one when ever i try to open vcmp browser, it crashes after auto update progress bar


ERROR 1
Problem signature:
  Problem Event Name: BEX
  Application Name: VCMPBrowser.exe
  Application Version: 0.0.0.0
  Application Timestamp: 5432b0df
  Fault Module Name: StackHash_4c4a
  Fault Module Version: 0.0.0.0
  Fault Module Timestamp: 00000000
  Exception Offset: 00000000
  Exception Code: c0000005
  Exception Data: 00000008
  OS Version: 6.1.7600.2.0.0.256.48
  Locale ID: 1033
  Additional Information 1: 4c4a
  Additional Information 2: 4c4ad7529a34983b6293625c48169922
  Additional Information 3: 4c4a
  Additional Information 4: 4c4ad7529a34983b6293625c48169922


Error 2

Problem signature:
  Problem Event Name: APPCRASH
  Application Name: VCMPBrowser.exe
  Application Version: 0.0.0.0
  Application Timestamp: 5432b0df
  Fault Module Name: MSVCR120.dll
  Fault Module Version: 12.0.21005.1
  Fault Module Timestamp: 524f7ce6
  Exception Code: c0000005
  Exception Offset: 0000f608
  OS Version: 6.1.7600.2.0.0.256.48
  Locale ID: 1033
  Additional Information 1: ad75
  Additional Information 2: ad7539a1050cd947e7161d5ea2ce0e0a
  Additional Information 3: d161
  Additional Information 4: d161f9a699f0b27ea496d329c2dc3c8d

EDIT: i tried reinstalling VCMP browser but the problem remains

Video: https://youtu.be/nUXnEHBHbEc
#16
Snippet Showroom / Stafflist System
Sep 07, 2015, 04:53 PM
I know i used a quiet bad way but its easy to learn for newbies must read my comments in the code

/* Hello i am bringing this system for those who need it but ensure that you change every thing in this system that in incompatable with your script such as Database, Messages, Functions like GetLevel */



function onScriptLoad()
{
db <- ConnectSQL("staff.sqlite");
QuerySQL( db, "CREATE TABLE IF NOT EXISTS StaffList ( Name TEXT, Level INT, State TEXT )" );
}

function onPlayerCommand( player, cmd, text
{
if ( cmd == "stafflist" )
{
if ( GetLevel(player) < 2 ) return 0; // Change this if you want
else
{
            local q = QuerySQL(db, "SELECT * FROM StaffList"),a=0;
            if( !GetSQLColumnData( q, 0 ) ) MessagePlayer(">> None Of Staff Member Has Been Added Yet.",player);
            else
            {
            while( GetSQLColumnData( q, 0 ) )
            {
                MessagePlayer(GREY+">> (" + GetSQLColumnData( q, 0 ) + " :: " + GetSQLColumnData( q, 1 ) + " :: " + GetSQLColumnData( q, 2 ) + ")",player ); 
GetSQLNextRow( q );
                a++;
            }   
}
FreeSQLQuery(q);
        }
}
}

checkingstaff( player ); // put this in your login function and autologin function such as AccInfo and in your setlevel command


function checkingstaff( player )
{
if ( GetLevel(player) >= 2 ) // Change It if you aren't using GetLevel Function or change the numeric values
   {
   local sl = QuerySQL( db, "SELECT * FROM StaffList WHERE Name='" + player.Name + "'" );
   if ( GetSQLColumnData( sl, 0 ) == null )
   {
   QuerySQL(db, "INSERT INTO StaffList (Name, Level, State) VALUES ('"+ player.Name +"', '"+ GetLevel(player) +"', '"+ GetLevelTag(player) +"')");
   }
   else
   {
   QuerySQL(db, "UPDATE StaffList SET Level='" + GetLevel(player) + "' WHERE Name='" + player.Name + "'");
   QuerySQL(db, "UPDATE StaffList SET State='" + GetLevelTag(player) + "' WHERE Name='" + player.Name + "'");
   }
FreeSQLQuery(sl);
   }
   else
   {
   QuerySQL(db, "DELETE FROM StaffList WHERE Name='"+player.Name+"'");
   }
}


function GetLevelTag(player) // this function is used for State in Stafflist
{
local lvl = GetLevel(player);
if( lvl == 1 ) return "Member";
if( lvl == 2 ) return "Moderator";
if( lvl == 3 ) return "Admin";
if( lvl == 4 ) return "Head Admin";
if( lvl == 5 ) return "Manager";
if( lvl == 6 ) return "Server Owner";
}

function GetLevel( player ) // dont add it if you have your own
{
   local lvl =  GetSQLColumnData( QuerySQL( db, "SELECT Level FROM Account WHERE Name='" + player.Name + "'" ), 0 );
   if ( lvl ) return lvl;
   else return 0;
   FreeSQLQuery( lvl );
}


checkingstaff updated the index sl doesnt exist fixed., levels updated
#17
Vehicle Creating Script v0.1 By Beztone & MatheuS(aka Takanaue)

Just Put The Following Data In You Script in Correct Places

Actually this system is just like an map editor :)

To spawn a vehicle use /addcar
/addcar <ModelID> <COLOR1> <COLOR2>
To erase current vehicle press Delete key

To save current vehicle in db press P key after parking the vehicle to your desired position

Note: Vehicle wont be edited/erased once you save it in db. Vehicle ModelIDs will be found Here and colorIDs will be found Here

class PlayerStats
{
IdBeingEdit = null;
IsBeingEdited =false;
}
function onScriptLoad()
{

status <- array(GetMaxPlayers(), null);
del <- BindKey(true,0x2E,0,0);
p <- BindKey(true,0x50,0,0);
vdb <- ConnectSQL("vehicles.sqlite");
if (vdb) print("Vehicles Database loaded Successfully");
::QuerySQL( vdb, "CREATE TABLE IF NOT EXISTS Vehicles ( Model INT, World INT, PX FLOAT, PY FLOAT, PZ FLOAT, Angle FLOAT, col1 INT, col2 INT)" );
LoadCars();
}

function onPlayerJoin( player )
{
status[player.ID] = PlayerStats();
}

function onPlayerCommand( player, cmd, text )
{
 if ( cmd == "addcar" )
 {
 if (player.Name == "YOURNICK") //this would be just like as admin system
 {
 if ( !text ) MessagePlayer( ">> Use /" + cmd + " <Model> <Col1> <Col2>", player );
  else if ( status[player.ID].IsBeingEdited==true ) MessagePlayer( "Recent vehicle Not Saved Yet", player );
  else
  {
   local
    model = GetTok(text," ",1),
    color1 = GetTok(text," ",2),
    color2 = GetTok(text," ",3);
   if ( !model || !color1 || !color2 ) MessagePlayer( ">> Use /" + cmd + " <Model> <Col1> <Col2>", player );
   else
   {
   status[player.ID].IsBeingEdited=true;
    player.Vehicle = CreateVehicle( model.tointeger(), player.World, Vector( player.Pos.x.tofloat(), player.Pos.y.tofloat(), player.Pos.z.tofloat() ), player.Angle.tofloat(), color1.tointeger(), color2.tointeger() );
    Message( "[#FF0000]Vehicle Created, Park The Vehicle To You Pos and [#FFFFFF]Press P to Save It In Database" );
   status[player.ID].IdBeingEdit = player.Vehicle.ID;
   }
  }
 }
 }
return 1;
}

function LoadCars()
{
 local q = QuerySQL( vdb, "SELECT * FROM Vehicles" ), i = 0;
 while( GetSQLColumnData( q, 0 ) )
 {
  local
   Model = GetSQLColumnData( q, 0 ),
   World = GetSQLColumnData( q, 1 ),
   PX= GetSQLColumnData( q, 2 ),
   PY = GetSQLColumnData( q, 3 ),
   PZ = GetSQLColumnData( q, 4 ),
   Angle = GetSQLColumnData( q, 5 ),
   col1 = GetSQLColumnData( q, 6 ),
   col2 = GetSQLColumnData( q, 7 );
 
  CreateVehicle( Model.tointeger(), World.tointeger(), Vector( PX.tofloat(), PY.tofloat(), PZ.tofloat() ), Angle.tofloat(), col1, col2 );
  GetSQLNextRow( q );
  i++;
 }
 print( "Cars loaded - " + i );

}

function onPlayerEnterVehicle( player, vehicle, door )
{
Message("Vehicle ID: "+vehicle.ID+" Model ID: "+vehicle.Model)
}


function onKeyDown( player, key )
{
 if(key==del)
    {
      if(status[player.ID].IsBeingEdited==false) Message(player.Name+": [#FFFFFF]First turn on editing");
  else if(!player.Vehicle) Message(player.Name+": [#FFFFFF]Must Be In Vehicle To Remove");
  else if(!player.Vehicle.ID == status[player.ID].IdBeingEdit) Message(player.Name+": [#FFFFFF]This Vehicle Is Not In Editing Process");
   else
   {
   FindVehicle(player.Vehicle.ID).Delete();
   status[player.ID].IsBeingEdited=false;
   status[player.ID].IdBeingEdit = null;
    Message( "[#FF0000]Admin [#FFFFFF]" + player.Name + " [#FF0000]Erased Vehicle from [#FFFFFF]" + GetDistrictName( player.Pos.x, player.Pos.y ) + "." );
   }
    }
    else if(key==p)
    {
      if(status[player.ID].IsBeingEdited==false) Message(player.Name+": [#FFFFFF]First turn on editing");
      else if(!player.Vehicle) Message(player.Name+": [#FFFFFF]Must Be In Vehicle To Save Vehicle");
  else if(!player.Vehicle.ID == status[player.ID].IdBeingEdit) Message(player.Name+": [#FFFFFF]This Vehicle Is Not In Editing Process");
   else {
      QuerySQL( vdb, "INSERT INTO Vehicles ( Model, World, PX, PY, PZ, Angle, col1, col2 ) VALUES ( '" + player.Vehicle.Model + "', '" + player.Vehicle.World + "', '" + player.Vehicle.Pos.x + "', '" + player.Vehicle.Pos.y + "', '" + player.Vehicle.Pos.z + "', '" + player.Vehicle.EulerAngle.z + "', '" + player.Vehicle.Colour1 + "', '" + player.Vehicle.Colour2 + "')" );
    Message(player.Name+": [#FFFFFF]Vehicle Saved In Database");
status[player.ID].IsBeingEdited=false;
status[player.ID].IdBeingEdit = null;
}
    }
}

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();
}

The System Is Tested By me So If You Found Any BUG The Comment Bellow

Updated: classes was missed

Edited on 07/01/2016: forgot to mention Keys and command
#18
My Custom Vehicles Collection

#19
Easy to use and Tested

Just put spawnwep.nut in your server folder then

class PlayerStats

{
     spawnwepenabled = false;

spawnwepinstalled = false;

}


function onScriptLoad()
{
db <- ConnectSQL( "Spawnwep.db" ); // if you already created the database on db string then remove this line
globalslot<-{};
stats <- array( GetMaxPlayers(), null );
dofile("spawnwep.nut", true);

}

function onPlayerJoin( player )
{
stats[player.ID] = PlayerStats();
loadspawnwep(player.Name,ID);
}

function onPlayerPart( player, reason )
{
  savespawnwep(player.Name,player.ID);
}

function onPlayerSpawn( player )
{
      spawnwep(player);
  }



function onPlayerCommand( player, cmd, text )
{
if(cmd=="spawnwep"||cmd=="dspawnwep")
    {
onspawnwepcommand(player.Name,cmd,text);
}
}




Note: there is a Table creating query must look it if you didnt loaded database as "db <- ConnectSQL

Credits: @hotdogcat

Update: added functions that was missed before
#20
Snippet Showroom / [Advanced] AFK system
Jul 24, 2015, 08:33 AM
Away From Keyboard System

onScriptLoad()
{
pAway <- {};
oldname <- array( GetMaxPlayers(), null );
}

function onScriptUnload(){
local I, player, mp = GetMaxPlayers();
for(I = 0; I < mp; ++I ){ // place it in first line
player = FindPlayer( I )
if (pAway.rawin(oldname[player.ID]))
{
player.Name = ""+oldname[player.ID]+"";
pAway.rawdelete( player.Name );
oldname[player.ID] = null;
}
}
//Your shitty codes here.

}

function onPlayerJoin( player )
{
if(pAway.rawin(player.Name))
{
Message("Kicked "+player.Name+", Reason: A player with same nick already exist");
 player.Kick();
}
}

function onPlayerPart( player, reason )
{
if (pAway.rawin(oldname[player.ID])) // place it in first line
{
player.Name = ""+oldname[player.ID]+"";
pAway.rawdelete( player.Name );
oldname[player.ID] = null;
}
}
function onPlayerChat(player, text)
{
if ( text == "afk" || text == "AFK" )
{
if (pAway.rawin(oldname[player.ID])) MessagePlayer("Failure - You Have Already Used AFK, try BACK Instead",player);
else{
Message(player+" Is Now AFK!");
EchoMessage(player+" Is Now AFK!");
oldname[player.ID]= player.Name;
pAway.rawset(player.Name, "afk");
player.Name = ""+player.Name+"(AFK)";
}
}
else if ( text == "back" || text == "BACK" )
{
if (!pAway.rawin(oldname[player.ID])) MessagePlayer("Failure - You Haven't Used AFK",player);
else{
Message(""+oldname[player.ID]+" Is Now Back!");
EchoMessage(""+oldname[player.ID]+" Is Now Back!");
player.Name = ""+oldname[player.ID]+"";
pAway.rawdelete( player.Name );
oldname[player.ID] = null;
}
}
return 1;
}


Updated: On Table now Thanks To @rulk and @NE.CrystalBlue For Examples