UGX-Mods Login

or login with an authentication provider below
Sign In with Google
Sign In with Twitter
Sign In with Discord
Sign In with Steam
Sign In with Facebook
Sign In with Twitch

Need help giving the player a weapon

broken avatar :(
Created 12 years ago
by Deleted User
0 Members and 1 Guest are viewing this topic.
4,169 views
broken avatar :(
  • DeletedUser
  • Deleted Member
×
broken avatar :(
DeletedUser
This user is deleted :(
i made this scirpt but its not working can anyone help? :D

Code Snippet
Plaintext
givempweapon()
{

{
self giveWeapon("radar_mp");
wait 4;
self takeWeapon("radar_mp");
}

}
broken avatar :(
×
broken avatar :(
Location: usYork, SC
Date Registered: 30 March 2013
Last active: 12 years ago
Posts
24
Respect
Forum Rank
Legless Crawler
Primary Group
Member
My Contact & Social Links
More
Personal Quote
Coder
Signature
PROxFTW
×
blackbird431's Groups
blackbird431's Contact & Social LinksPROxFTWiso4lif3PROxFTWJTAGxHACKER
1) Make sure you thread the code
2) Make sure radar_mp is in your weapons folder
3) You have an extra set of braces there
broken avatar :(
  • DeletedUser
  • Deleted Member
×
broken avatar :(
DeletedUser
This user is deleted :(
1) Make sure you thread the code
2) Make sure radar_mp is in your weapons folder
3) You have an extra set of braces there

Dose not work and i did every thing you said :( i get a bad syntax here what it looks like

Code Snippet
Plaintext
givempweapon()
{
   
    {
    self giveWeapon("radar_mp"));
    wait 4;
    self takeWeapon("radar_mp"));
    }

}
broken avatar :(
×
broken avatar :(
Location: usYork, SC
Date Registered: 30 March 2013
Last active: 12 years ago
Posts
24
Respect
Forum Rank
Legless Crawler
Primary Group
Member
My Contact & Social Links
More
Personal Quote
Coder
×
blackbird431's Groups
blackbird431's Contact & Social LinksPROxFTWiso4lif3PROxFTWJTAGxHACKER
Missed one extra thing. Here try this.
You also has an extra ) that was somehow added
Code Snippet
Plaintext
givempweapon()
{
    self giveWeapon("radar_mp");
    wait 4;
    self takeWeapon("radar_mp");
}
Last Edit: February 05, 2014, 02:49:41 am by blackbird431
broken avatar :(
  • DeletedUser
  • Deleted Member
×
broken avatar :(
DeletedUser
This user is deleted :(
Missed one extra thing. Here try this.
You also has an extra ) that was somehow added
Code Snippet
Plaintext
givempweapon()
{
    self giveWeapon("radar_mp");
    wait 4;
    self takeWeapon("radar_mp");
}

Dose not work :D
broken avatar :(
×
broken avatar :(
drago
Location: mx
Date Registered: 5 July 2013
Last active: 7 years ago
Posts
941
Respect
Forum Rank
The Decider
Primary Group
Member
My Contact & Social Links
More
×
jjbradman's Groups
jjbradman's Contact & Social Linksjjbradmanjjbradmanjjbradman
you want the script to give the players one gun at game start or by using a trigger?
also you want to give it to one player or all of them
broken avatar :(
  • DeletedUser
  • Deleted Member
×
broken avatar :(
DeletedUser
This user is deleted :(
you want the script to give the players one gun at game start or by using a trigger?
also you want to give it to one player or all of them

I need it to give the player the weapon by a trigger :D and it would be nice if it gave it to one player
broken avatar :(
  • n123q45
  • Deleted Member
×
broken avatar :(
n123q45
This user is deleted :(
are you defining giveweapon? because if not it wont know what to do if you arent
broken avatar :(
  • DeletedUser
  • Deleted Member
×
broken avatar :(
DeletedUser
This user is deleted :(
are you defining giveweapon? because if not it wont know what to do if you arent

How you i do that i have never done that before so idk :D
broken avatar :(
×
broken avatar :(
Location: se
Date Registered: 30 July 2013
Last active: 2 years ago
Posts
517
Respect
Forum Rank
Zombie Enslaver
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
×
Ege115's Groups
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
Ege115's Contact & Social LinksEge115
When you make a script, you often need the lines that is at the top of almost every script.

These, add these at the very top of the script, those are files that needs to be in a script to get a script working, depending of what kind of script it is.
So above

Code Snippet
Plaintext
giveweapon()

Add

Code Snippet
Plaintext
#include common_scripts\utility;
#include maps\_utility;
#include maps\_zombiemode_utility;

Note: I am not saying that this is the reason why it doesn't work, it is just an idea because in almost every script, these files are needed to get a script to work.
broken avatar :(
×
broken avatar :(
Location: de
Date Registered: 6 August 2012
Last active: 6 years ago
Posts
277
Respect
Forum Rank
Mr. Elemental
Primary Group
Scripter Elite
My Groups
More
×
YaPh1l's Groups
Scripter Elite Has shown excellence and experience in the area of custom scripting in the UGX-Mods community.
YaPh1l's Contact & Social Links
are you defining giveweapon? because if not it wont know what to do if you arent
GiveWeapon() and TakeWeapon() are engine functions. You don't need to define them.

- Phil.

 
Loading ...