Sign in to follow this  
DeadthStrock

Execute Command In Admin-Panel

Recommended Posts

Hellow Friends !

        I think you've heard / experienced / saw an execute command field with the text "For Advanced Users Only" , that we can see inside the resource tab of admin-panel

As far as I know, we can insert commands, for example,

outputChatBox("Hellow Mates!",root,255,255,0)

and hit the server button will output text to everyone. Okay..!!??

setElementHealth(source,100)
killPed(source)
setDevelopmentMode(true)

,are some examples that can be executed using admin-panel's execute field.

But I have a problem. How did I execute a code like bellow, using above admin-panel's execute field ?? Is it possible ??

local vehicle = getPedOccupiedVehicle(localPlayer)
setElementVelocity(vehicle,0,0,5)

and what occasions did you using this execute command field ??

Edited by DeadthStrock

Share this post


Link to post

Check the 'runcode' resource. (default MTA resource, like admin-panel)

You can use this resource to run scripts with commands.

- Server side script: /srun <script>

- Client side script: /crun <script>

 

(You need to use one-line script. example: /crun x,y,z = getElementPosition(localPlayer) setElementPosition(localPlayer, x,y,z+5))

Share this post


Link to post

As Patrick said, use runcode for this xD

setElementVelocity(getPedOccupiedVehicle(localPlayer),0,0,5)

can be 

/srun setElementVelocity(getPedOccupiedVehicle(localPlayer),0,0,5)

or 

/crun setElementVelocity(getPedOccupiedVehicle(localPlayer),0,0,5)

Share this post


Link to post

You dont need to take out the local variable(but its recommended, because of clearness of the code)
Since the interpreter doesnt care if everything is in one line, you could just write in:
 

local vehicle = getPedOccupiedVehicle(localPlayer);setElementVelocity(vehicle, 0, 0, 5)
local vehicle = getPedOccupiedVehicle(localPlayer) setElementVelocity(vehicle, 0, 0, 5)

Or maybe this(im not sure about this one, but try it):

local vehicle = getPedOccupiedVehicle(localPlayer)setElementVelocity(vehicle, 0, 0, 5)

But the best is what _Evo_ wrote:

Quote

setElementVelocity(getPedOccupiedVehicle(localPlayer),0,0,5)

 

 

Share this post


Link to post

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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.