May 27, 2018, 05:14:38 am

Author Topic: [SNIPPED] Client Menu Selection Of Weapons.  (Read 499 times)

0 Members and 1 Guest are viewing this topic.

kennedy

  • VW7 - The Triumvirate
  • Fanatic
  • *
  • Posts: 141
  • Country: ve
  • American Roleplay
    • View Profile
    • Awards
[SNIPPED] Client Menu Selection Of Weapons.
« 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


« Last Edit: April 11, 2017, 03:16:10 pm by kennedy »
Agree Agree x 1 Winner Winner x 1 Useful Useful x 1 (list)
Agree Disagree Funny Winner Pwnt Informative Friendly Useful Optimistic Artistic Late Brain Donor


Dr.Shawn

  • Vice Underdog
  • Crazy Man
  • *
  • *
  • *
  • Posts: 2198
  • Country: in
    • View Profile
    • Awards
Re: [SNIPPED] Client Menu Selection Of Weapons.
« Reply #1 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'
Agree Agree x 1 (list)
Agree Disagree Funny Winner Pwnt Informative Friendly Useful Optimistic Artistic Late Brain Donor


kennedy

  • VW7 - The Triumvirate
  • Fanatic
  • *
  • Posts: 141
  • Country: ve
  • American Roleplay
    • View Profile
    • Awards
Re: [SNIPPED] Client Menu Selection Of Weapons.
« Reply #2 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
« Last Edit: April 11, 2017, 05:36:22 pm by kennedy »
Agree Disagree Funny Winner Pwnt Informative Friendly Useful Optimistic Artistic Late Brain Donor