GerardWay Posted August 19, 2013 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)
XFawkes Posted August 19, 2013 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)
golanu21 Posted August 19, 2013 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)
Moderators IIYAMA Posted August 19, 2013 Moderators 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)
GerardWay Posted August 19, 2013 Author Posted August 19, 2013 Didn't work, could you provide a Meta.xml too so I can make sure my Meta is correct please?
Moderators IIYAMA Posted August 19, 2013 Moderators Posted August 19, 2013 Why don't you post your meta and then we fix it.
GerardWay Posted August 19, 2013 Author Posted August 19, 2013 "Booker" type="script" name="USMC Area" description="USMC Squad" />
golanu21 Posted August 19, 2013 Posted August 19, 2013 "Booker" type="script" name="USMC Area" description="USMC Squad" />
Moderators IIYAMA Posted August 19, 2013 Moderators 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.
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