Jump to content

USMC Command


GerardWay

Recommended Posts

Posted

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) 

Posted
function usmc(thePlayer) 
    setElementModel (thePlayer, 287) 
    giveWeapon (thePlayer, 28, 500) 
    local team = createTeam ("USMC") 
    setPlayerTeam (thePlayer, team) 
end 
addCommandHandler ("usmc", usmc) 

Posted
  
--server side 
 team = createTeam ("USMC") 
  
function usmc() 
    setElementModel (source, 287) 
    giveWeapon (source, 28, 500) 
    setPlayerTeam (source, team) 
end 
addCommandHandler ("usmc", usmc) 

  • Moderators
Posted

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) 

  • Moderators
Posted

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.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...