GerardWay Posted August 19, 2013 Share Posted August 19, 2013 Can anyone fix this please? Nothing in this script works. function usmc() setElementModel (source, 287) give weapon (source, 28, 500) createTeam ("USMC") setPlayerTeam (source, USMC) end addCommandHandler ("usmc", usmc) Link to comment
XFawkes Posted August 19, 2013 Share Posted August 19, 2013 function usmc(thePlayer) setElementModel (thePlayer, 287) giveWeapon (thePlayer, 28, 500) local team = createTeam ("USMC") setPlayerTeam (thePlayer, team) end addCommandHandler ("usmc", usmc) Link to comment
GerardWay Posted August 19, 2013 Author Share Posted August 19, 2013 Didn't work, but thanks anyway Link to comment
golanu21 Posted August 19, 2013 Share Posted August 19, 2013 --server side team = createTeam ("USMC") function usmc() setElementModel (source, 287) giveWeapon (source, 28, 500) setPlayerTeam (source, team) end addCommandHandler ("usmc", usmc) Link to comment
Moderators IIYAMA Posted August 19, 2013 Moderators Share Posted August 19, 2013 addCommandHandler don't have a source. Server side USMCteam = createTeam ("USMC") addCommandHandler ("usmc", function(player) if not isPedDead(player) then setElementModel (player, 287) giveWeapon (player, 28, 500) end setPlayerTeam (player, USMCteam) end) Link to comment
GerardWay Posted August 19, 2013 Author Share Posted August 19, 2013 Didn't work, could you provide a Meta.xml too so I can make sure my Meta is correct please? Link to comment
Moderators IIYAMA Posted August 19, 2013 Moderators Share Posted August 19, 2013 Why don't you post your meta and then we fix it. Link to comment
GerardWay Posted August 19, 2013 Author Share Posted August 19, 2013 "Booker" type="script" name="USMC Area" description="USMC Squad" /> Link to comment
golanu21 Posted August 19, 2013 Share Posted August 19, 2013 "Booker" type="script" name="USMC Area" description="USMC Squad" /> Link to comment
Moderators IIYAMA Posted August 19, 2013 Moderators Share Posted August 19, 2013 Golanu21, if you don't define the type it will set automatic to serverside. @ Booker DeWitt: - The script starts correct? - Correct folder name? - /debugscript 3 Normally the server console will show you if the resource starts with success. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now