Vice Underdogs

Scripting => Script Showroom => Topic started by: kennedy on April 11, 2017, 03:12:54 pm

Title: [SNIPPED] Client Menu Selection Of Weapons.
Post by: kennedy on April 11, 2017, 03:12:54 pm
Hey Guys. I have made a system for the Player to give spawm a menu of weapons appear on your screen and you can select the desired ones

Step 1)
In scripts/main.nut  add This
Example:

Code: [Select]
function onPlayerSpawn( player )
{
    Stream.StartWrite()
Stream.WriteInt(1)
Stream.SendStream(player)
NewTimer( "CloseMenuWeps", 5000, 1, player.ID );
}

function CloseMenuWeps( player )
{
local p = FindPlayer( player )
Stream.StartWrite()
Stream.WriteInt(2)
Stream.SendStream(p)
}

//============================== C L I E N T  S I D E  D A T A ==============================================//
function onClientScriptData(player)
{
local string = Stream.ReadString(), int = Stream.ReadInt();
    if(string == "set1")
{
    player.SetWeapon(21 ,999)
player.SetWeapon(26 ,999)
MessagePlayer("[#FF1111][SET] [#FFFFFF]You received the set number [#FF1111]#1",player)
}
else if (string == "set2")
{
    player.SetWeapon(21 ,999)
player.SetWeapon(27 ,999)
player.SetWeapon(12 ,999)
MessagePlayer("[#FF1111][SET] [#FFFFFF]You received the set number [#FF1111]#2",player)
}
else if (string == "set3")
{
    player.SetWeapon(20 ,999)
player.SetWeapon(12 ,20)
MessagePlayer("[#FF1111][SET] [#FFFFFF]You received the set number [#FF1111]#3",player)
}
else if (string == "set4")
{
    player.SetWeapon(21 ,999)
player.SetWeapon(29 ,999)
MessagePlayer("[#FF1111][SET] [#FFFFFF]You received the set number [#FF1111]#4",player)
}
else if (string == "set5")
{
    player.SetWeapon(19 ,999)
player.SetWeapon(32 ,999)
MessagePlayer("[#FF1111][SET] [#FFFFFF]You received the set number [#FF1111]#5",player)
}
else if (string == "set6")
{
    player.SetWeapon(21 ,999)
player.SetWeapon(28 ,999)
player.SetWeapon(15 ,20)
MessagePlayer("[#FF1111][SET] [#FFFFFF]You received the set number [#FF1111]#6",player)
}
else if (string == "set7")
{
    player.SetWeapon(21 ,999)
player.SetWeapon(30,999)
MessagePlayer("[#FF1111][SET] [#FFFFFF]You received the set number [#FF1111]#7",player)
}
else if (string == "set8")
{
    player.SetWeapon(21 ,999)
player.SetWeapon(13 ,999)
MessagePlayer("[#FF1111][SET] [#FFFFFF]You received the set number [#FF1111]#8",player)
}
else if (string == "set9")
{
    player.SetWeapon(21 ,999)
player.SetWeapon(31 ,999)
MessagePlayer("[#FF1111][SET] [#FFFFFF]You received the set number [#FF1111]#9",player)
}
}

Step 2 ) Download main.nut and paster in store/script
http://files.thijn.ovh/download/ea5acd192ff303eb66c1eec5b0f817e8/main.nut]

ScreenShots

(https://viceunderdogs.com/proxy.php?request=http%3A%2F%2Fi.imgur.com%2FWY5KexB.png&hash=70be30050183eaa3707fbbd58bc287255769573b)
Title: Re: [SNIPPED] Client Menu Selection Of Weapons.
Post by: Dr.Shawn on April 11, 2017, 05:02:34 pm
Good work, it will be better if you set weps by category rather than a pre-defined list of weps.
Join xe some day, Drake's work is kinda better.
Good efforts tho'
Title: Re: [SNIPPED] Client Menu Selection Of Weapons.
Post by: kennedy on April 11, 2017, 05:15:14 pm
Good work, it will be better if you set weps by category rather than a pre-defined list of weps.
Join xe some day, Drake's work is kinda better.
Good efforts tho'

Thanks it's nothing uncle. Ok i will do it later