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

#1
General Discussion / Re: Doubt Health
Aug 22, 2019, 06:18 AM
function onPlayerHealthChange( player, lastHP, newHP )
{
     if ( lastHP > newHP ) MessagePlayer( "You just lost " + ( lastHP - newHP ) + " health.", player );
}

https://wiki.vc-mp.org/wiki/OnPlayerHealthChange
#3
Quote from: . on Jun 06, 2016, 11:30 PMYou're using an old plugin. Update your stuff.
Solved. Thanks!
#4

What is the problem?

O.S. Ubuntu 12.04 x64
#5
Quote from: KAKAN on Jun 05, 2016, 04:26 PM
Quote from: . on Jun 05, 2016, 04:25 PMYou probably need:

sudo apt-get install libmysqlclient18
what? mysqlclient? He's using SQLite. That happened to me too. Use Thijn's builds and try:-
http://vcmp.thijn.ovh/builds/
Thanks :)
#6
I bought a vps and when I try to run it shows this error.


"ConnectSQL" does not exist.

but the plugin has loaded. :-\



VPS: Operating System   Ubuntu 12.04 x64

Can someone help me?
 
#7
Quote from: [DS]Anik on Jan 16, 2016, 10:14 AMOff:- Which SOftware are u using for editing scripts?? Can u give me Download Link??

Subline.
http://www.sublimetext.com/
#8
Quote from: Williams on Jan 16, 2016, 04:17 AMThis topic already posted. Btw great! :)
This is different. :)
#9
Snippet Showroom / Spawnwep System by Mack
Jan 16, 2016, 02:38 AM
Hello, I go back again lol.


> First copy this lines and paste on "onScriptLoad()"
  db <- ConnectSQL( "Spawnwep.db" );
  QuerySQL( db,"CREATE TABLE IF NOT EXISTS Spawnwep( Nick TEXT, Weps TEXT)");
  SpawnwepPlayer <- array( GetMaxPlayers(), null );

> Now copy this line and paste on "onPlayerJoin( player )"
LoadSpawnwep(player);
> Paste this on "onPlayerSpawn( player )"
GiveSpawnwep(player);
> And now paste this on "onPlayerPart( player, reason )"
if (SpawnwepPlayer[ player.ID ] != null)
{
if(!CheckTableSpawnwep( player )) QuerySQL( db, "REPLACE INTO Spawnwep( Nick, Weps ) VALUES ( '" + player.Name + "','"+ SpawnwepPlayer[ player.ID ] + "' ) ");
else QuerySQL( db, "UPDATE Spawnwep SET Weps='"+ SpawnwepPlayer[ player.ID ] +"' WHERE Nick='" + player.Name + "'" );
SpawnwepPlayer[ player.ID ] = null; print( player.Name +"'s Spawnwep Saved!" );
}



//=================================SPAWNWEP STSTEM BY MACK==========================================================
function CheckTableSpawnwep( player )
{
    local si = GetSQLColumnData( QuerySQL( db, "SELECT Weps FROM Spawnwep WHERE Nick='" + player.Name + "'" ), 0 );
    if ( si ) return si;
    else return 0;
}
//-------------------------------------------------------------------------------------------------------------------
function LoadSpawnwep(player)
{
if(CheckTableSpawnwep( player )) SpawnwepPlayer[ player.ID ] = CheckTableSpawnwep( player );
else SpawnwepPlayer[ player.ID ] = null;
}
//-------------------------------------------------------------------------------------------------------------------
function GiveSpawnwep(player)
{
if (SpawnwepPlayer[ player.ID ] != null)
{
local i = 1, khe = SpawnwepPlayer[ player.ID ], Nweps = NumTok( khe," ");
while ( i < (Nweps.tointeger()+1))
{
local ID = GetTok( khe," ", i);
player.SetWeapon( ID.tointeger(), 99999 ); i++;
}
ClientMessage("-> [#83bab3][SPAWNWEP] Weapons setting in spawn, Completed successfully.",player,255,0,102);
}
}
//=================================SPAWNWEP STSTEM BY MACK==========================================================

> Credits to original creator of this functions.
//-------------------------------------------------------------------------------------------------------------------
function NumTok(string, separator)
{
    local tokenized = split(string, separator);
    return tokenized.len();
}
//-------------------------------------------------------------------------------------------------------------------
function GetPlayer( target )
{
local target1 = target.tostring();

if ( IsNum( target ) )
{
target = target.tointeger();

if ( FindPlayer( target) ) return FindPlayer( target );
else return null;
}
else if ( FindPlayer( target ) ) return FindPlayer( target );
else return null;
}
//-------------------------------------------------------------------------------------------------------------------

> Commands: /spawnwep, /spawnwepdel. <
if ( cmd == "spawnwep" )
    {
       
  if ( !text ) ClientMessage( "[#ea4335]-> Error: [#fbbc05]Type /spawnwep <Wep1> <Wep2> <Wep3> <Wep4> <Wep5> <Wep6>...", player,0,0,0 );
        else
        {
            local weps = split( text, " " ),ID, wepsset = null;
            for( local i = 0; i < weps.len(); i++ )
            {
                ( IsNum( weps[ i ] ) ) ? ID = weps[ i ].tointeger() : ID = GetWeaponID( weps[ i ] );                         
                if ( ID >= 33 ) ClientMessage( "[#ea4335]-> Error: [#c0c0c0]Invalid Weapon ID/Name.", player,0,0,0 );
                else
                {
                    player.SetWeapon( ID, 99999 );
                    ClientMessage( "-> [#daff00]Saving " + GetWeaponName( ID ) + " to your spawn.",player,255,0,102);
                    if (wepsset == null) wepsset = " "+ ID;
                    else wepsset += (" " + ID);
                }
            }
            if (wepsset) SpawnwepPlayer[ player.ID ] = wepsset;   
        }
    }
    else if ( cmd == "spawnwepdel")
    {

    if ( CheckTableSpawnwep( player ) )
    {
        QuerySQL( db, "DELETE FROM SpawnWep WHERE Nick='" + player.Name + "' COLLATE NOCASE" );
        ClientMessage( "-> Your Spawnwep have been deleted.",player,255,0,102); SpawnwepPlayer[ player.ID ] = null;
    }
    else ClientMessage( "-> Error: You not have spawnwep.",player,255,0,102);
    }

And the end would look like this.





I tested this script and work :)
Dowload Script: Mediafire
Virus Total: Link
#10
every time you join type /admin password
#11
A few days ago I decided to make an updated version of this script:
http://vcmp.liberty-unleashed.co.uk/forum/index.php?topic=555.0
well....

>> Attack & Defend Server 0.4
>> Remake by: Mack
>> Credit to Murid (original script) & [VU]Cutton (Script SQ vcmp 0.3)


Download Server: Mediafire Google Drive
Virus Scam: Virus Scam

Plugins required: announce04rel, sqlite04rel, squirrel04rel.

Download Plugins.
Windows x86
Windows x64
Linux x86
Linux x64

Server:
Windows 32Bits
Windows 64Bits
Linux 32Bits
Linux 64Bits

Commands
General Cmds: /score, /stats, /base, /set, /side, /setlist, /teamhp, /help, /credits.
Admin Cmds: /startbase, /end, /add, /remove, /switchteams, /pause, /unpause, /ann, /setchoice, /kick,/exec.

¿How to configure?
1-Open Main.nut and edit.


¿How to be admin?
1- Type /admin <admin password>