Custom Weapon

Started by PsyChO_KiLLeR, Mar 05, 2015, 04:21 AM

Previous topic - Next topic

PsyChO_KiLLeR

well i am releasing some custom weapons here i give two custom weapons there
Link http://www.2shared.com/file/zh20OEqP/w101_s8_l28_AK.html and
 http://www.2shared.com/file/KfvxygzL/w102_s8_l28_m60.html
Just Paste it to server/store/weapons/here
 and take this cmd which unable u to done it quick dont need to use /exec 

       else if ( cmd == "buy" )
{
if ( text )
{
if (player.IsSpawned)
{if (IsNum ( text ))
{
if ( text == "101" )
{
MessagePlayer( "You Bought Custom Weapon of AK-47", player );
player.SetWeapon( 101,999);
}
else if ( text == "102" )
{
MessagePlayer( "You Bought Custom Weapon of Rifle", player );
player.SetWeapon( 102,999);
}
}
else MessagePlayer( "[Error] - ID must be in numbers", player );
}
else MessagePlayer( "[Error] - You have'nt spawned yet!", player );
}
else MessagePlayer( "[Syntax] - /wep <Wep ID 100 to 108>", player );
}





And If u want also hotkey then here it is i am ready to make it

Add this on Main.nut onScriptLoad L <- BindKey(true, 0x4C,0,0);


Add this on Your Function KeyDown

if( key == L )
{
       if ( !player.IsSpawned ) MessagePlayer( "[Error] - You haven't spawned yet..", player );
else
{
                   player.SetWeapon(101,999);
                   player.SetWeapon(102,999);
                   Announce( "Custom Weapons Given", player );
   MessagePlayer( "You got Custom Weapons.", player );
}
}   


UPDATED

Maybe U Enjoy THat If any error comes then tell me


Credits Goes To Rathore and Me Rathore help me in buy command



jayant

Edit the script..So,everyone can use the script..ePrivMessage and DecCash will not work for others,If they are not having them in their script..Give credits to those who helped you in making the Custom weapons.

MacTavish

Use MessagePlayer instead PrivMessage and ePrivMessage and use player.Cash instead DecCash

Grand Hunting Project
Join #SLC, #KAKAN, #Doom, #GHP @LUnet

Retired VC:MP Player/Scripter :P

Kratos_

#3
Quote from: Beztone on Mar 05, 2015, 06:41 AMuse player.Cash instead DecCash

DecCash is safer than using player.Cash directly as DecCash tracks player cash through arrays . So, player cash will follow Server Side
Cash Protocol & therefore money hack would end up with no result  .
In the middle of chaos , lies opportunity.

PsyChO_KiLLeR

well kratos some newbies dont have deccash so i put playercash

MacTavish

Quote from: PsyChO_KiLLeR on Mar 05, 2015, 06:59 AMwell kratos some newbies dont have deccash so i put playercash

Kratos is right. Post your IncCash and DecCash function

Grand Hunting Project
Join #SLC, #KAKAN, #Doom, #GHP @LUnet

Retired VC:MP Player/Scripter :P

PsyChO_KiLLeR

there it is

function DecCash( player, amount )
{
    local cash = status[ player.ID ].Cash;
   local det = cash - amount;
   status[ player.ID ].Cash = det;
   player.Cash = det;
}

function IncCash( player, amount )
{
      local cash = status[ player.ID ].Cash;
     local add = cash + amount;
     status[ player.ID ].Cash = add;
     player.Cash = add;
}

PsyChO_KiLLeR


rObInX

Quote from: PsyChO_KiLLeR on Mar 05, 2015, 10:34 AMwhats now?

I don't know why is such things being released here.

This is script showroom.

PsyChO_KiLLeR

what ur mean any error?

MacTavish

Quote from: PsyChO_KiLLeR on Mar 05, 2015, 10:50 AMwhat ur mean any error?
You are posting stuff in script showroom ( Script showroom is for releasing scripts ). It have to be in Snippet showroom

Grand Hunting Project
Join #SLC, #KAKAN, #Doom, #GHP @LUnet

Retired VC:MP Player/Scripter :P

PsyChO_KiLLeR

ok next time  i will be

Sebastian

Quote from: PsyChO_KiLLeR on Mar 05, 2015, 04:21 AMCredits Goes To Rathore and Me Rathore help me in buy command

Ok, but where are the the credits for the creators of these weapons ? :|
Even if we add them in our servers, we still need to give them credits !

DeViL_JiN

Quote from: sseebbyy on Mar 05, 2015, 01:54 PM
Quote from: PsyChO_KiLLeR on Mar 05, 2015, 04:21 AMCredits Goes To Rathore and Me Rathore help me in buy command

Ok, but where are the the credits for the creators of these weapons ? :|
Even if we add them in our servers, we still need to give them credits !
True.

PsyChO_KiLLeR

These are created by me