MiniGoveya Posted January 11, 2011 Share Posted January 11, 2011 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
12p Posted January 11, 2011 Share Posted January 11, 2011 use it client-side and with an event. for example, onClientMarkerHit ==> addCommandHandler. Link to comment
MiniGoveya Posted January 11, 2011 Author Share Posted January 11, 2011 da? I dont understand .. Forget the part of text, i knew this hours ago, i need the scripts. Link to comment
12p Posted January 11, 2011 Share Posted January 11, 2011 Tell me what you wanna do with the command (how to activate it) Link to comment
TAPL Posted January 11, 2011 Share Posted January 11, 2011 [code=luaction mini ( playerSource, command )local car = getPedOccupiedVehicle ( playerSource ) fixVehicle(car)endaddCommandHandler ( "fix", mini )[/code] function mini ( playerSource, command ) local car = getPedOccupiedVehicle ( playerSource ) addVehicleUpgrade( car, 1010 ) end addCommandHandler ( "nos", mini ) Link to comment
MiniGoveya Posted January 11, 2011 Author Share Posted January 11, 2011 (edited) 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 January 11, 2011 by Guest Link to comment
proracer Posted January 11, 2011 Share Posted January 11, 2011 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
Castillo Posted January 12, 2011 Share Posted January 12, 2011 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
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