Jump to content

Some commands


MiniGoveya

Recommended Posts

Hello, how can i make it to everyone, to one specific person & only for me?

function mini ( playerSource, command ) 
  fixVehicle(player) 
end 
addCommandHandler ( "fix", mini ) 

function mini ( playerSource, command ) 
  addVehicleUpgrade( car, 1010 ) 
end 
addCommandHandler ( "nos", mini ) 

and say who gives x's thing to who.

like

minigoveya gives nitro to goveyamini

and the same thing to the fix function.

Link to comment
[code=luaction mini ( playerSource, command )

local car = getPedOccupiedVehicle ( playerSource )

  fixVehicle(car)

end

addCommandHandler ( "fix", mini )[/code]





function mini ( playerSource, command ) 
local car = getPedOccupiedVehicle ( playerSource ) 
  addVehicleUpgrade( car, 1010 ) 
end 
addCommandHandler ( "nos", mini ) 

Link to comment

how can i make

!fix all -- fix everyone

!fix -- fix specific person ( part of name not whole name )

!fix -- fix only me.

!nos all -- give nos to everyone

!nos -- give nos to specific person ( part of name not whole name )

!nos -- give nos only to me.

Edited by Guest
Link to comment

This for example adds NOS to every player.Im a newb too, so sorry I didn't tested and I don't know if it works but try it.

This is serverside script so remember to add "type = server" in meta.xml

local root = getRootElement() 
function addNitrosOxygen(command) 
if (isPedInVehicle (root)) then 
local vehicleUpgrade = getPedOccupiedVehicle (root) 
local vehicleUpgraded = addVehicleUpgrade (theVehicle, 1010) 
if (vehicleUpgraded) then 
outputConsole ("Nitro added to all players.", root) 
end 
end 
end 
  
addCommandHandler ("addnitro", addNitrosOxygen) 

Link to comment
function addNitrosOxygen(command) 
for i,players in pairs (getElementsByType("player")) do 
if (isPedInVehicle (players)) then 
local vehicleUpgrade = getPedOccupiedVehicle (players) 
local vehicleUpgraded = addVehicleUpgrade (vehicleUpgrade, 1010) 
if (vehicleUpgraded) then 
outputConsole ("Nitro added to all players.", players) 
end 
end 
end 
end 
addCommandHandler ("addnitro", addNitrosOxygen) 

P.S: Next time try something before say "doesn't work" ;)

Link to comment

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...