Jump to content

Some Stupid questions :D


Blaawee

Recommended Posts

  • Replies 64
  • Created
  • Last Reply

Top Posters In This Topic

@BinSlayer1 ><

solid in the the lua i have to defined it right like this :

shark = createObject ( 1608, 5540.6654, 1020.55122, 1240.545, 90, 0, 0 ) 
  
function attach ( source, commandName ) 
      local x, y, z = getElementPosition ( source ) 
      attachElements ( shark, source, 0, 0, 5 ) 
end 
addCommandHandler ( "shark", attach ) 

right ?

but in the execute command how should i defined it ?

Link to comment
shark? :lol:

you saw shark in my server, true? :lol:

i remember that was Bssol doing this lol

acttully i didn't saw that but heard it from some one becuse i'm not playing that much in your server :D

then he have to rename his topic name as Capy do 'More Stupid questions' :lol:

why not :D i'm learning

and solid i mean defined it in the execute command , is like this :

createObject ( 1608, getElementPosition (source), attachElements ( 0, 0, 5 )) 

Link to comment

If you want to make a command one then use this:

local sharks = {} 
  
addCommandHandler("shark", 
function (pl) 
if isElement(sharks[pl]) then destroyElement(sharks[pl]) sharks[pl] = nil end 
sharks[pl] = createObject ( 1608, 0, 0, 0 ) 
attachElements ( sharks[pl], pl, 0, 0, 5 ) 
end) 

Link to comment

let me show you with photo X_X

Example :

i used this function with Execute command

672087625.png

setPedChoking ( source, true ) 

and it's make me choking

#The idea of salvation

you can't make a local in the execute command

all i wana know is how to make it work without local

and how to make two function in the same function like

createObject 
attachElements 

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