Blaawee Posted December 13, 2011 Author Share Posted December 13, 2011 i wana try it with the execute command how i can do it , what is the right syntax for it Link to comment
Castillo Posted December 13, 2011 Share Posted December 13, 2011 If you want to replace a SKIN model, you'll need the model and the texture files. If you want to attach a shark object to a player, you must use: createObject attachElements Link to comment
BinSlayer1 Posted December 13, 2011 Share Posted December 13, 2011 i wana try it with the execute command how i can do it , what is the right syntax for it sry for the offtopic Link to comment
Blaawee Posted December 13, 2011 Author Share Posted December 13, 2011 @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
TAPL Posted December 13, 2011 Share Posted December 13, 2011 shark? you saw shark in my server, true? i remember that was Bssol doing this lol Link to comment
Castillo Posted December 13, 2011 Share Posted December 13, 2011 shark = createObject ( 1608, 5540.6654, 1020.55122, 1240.545, 90, 0, 0 ) attachElements ( shark, getPlayerFromName("MyName"), 0, 0, 5 ) Your questions are really stupid. Link to comment
TAPL Posted December 13, 2011 Share Posted December 13, 2011 then he have to rename his topic name as Capy do 'More Stupid questions' Link to comment
Blaawee Posted December 13, 2011 Author Share Posted December 13, 2011 shark? you saw shark in my server, true? 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 then he have to rename his topic name as Capy do 'More Stupid questions' why not 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
Castillo Posted December 13, 2011 Share Posted December 13, 2011 May I say: THAT'S A TOTAL MESS. Link to comment
Blaawee Posted December 13, 2011 Author Share Posted December 13, 2011 so what is the correct > Link to comment
Castillo Posted December 13, 2011 Share Posted December 13, 2011 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
Blaawee Posted December 13, 2011 Author Share Posted December 13, 2011 you didn't get me >< i wana create the object and attach it in the execute command not in lua what should type in the memo of execute command Link to comment
Castillo Posted December 13, 2011 Share Posted December 13, 2011 OMG, you're the one who doesn't understand. EXECUTE COMMAND = Lua! Are you f*** stupid or what? they're both the same thing, just copy the damn code. Link to comment
Blaawee Posted December 13, 2011 Author Share Posted December 13, 2011 let me show you with photo X_X Example : i used this function with Execute command 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
Castillo Posted December 13, 2011 Share Posted December 13, 2011 Just use "runcode", is a resource that comes with your MTA. Admin Panel execute command is bullshit. Link to comment
Blaawee Posted December 13, 2011 Author Share Posted December 13, 2011 o.k i run the code in runcode.htm and in console but not work ,nothing happend i typed /shark Link to comment
Castillo Posted December 13, 2011 Share Posted December 13, 2011 Use the in-game runcode ffs. /run Link to comment
Blaawee Posted December 13, 2011 Author Share Posted December 13, 2011 that's what showed in the chatbox : Command results: Error: [string "local sharks = {} addCommandHandler("shark", function (pl) if i..."]:1: ')' expected near '<eof>' Link to comment
Castillo Posted December 13, 2011 Share Posted December 13, 2011 Run sharks = {} first, then the rest... Else get a GUI-runcode, it's easy to create one. Link to comment
Blaawee Posted December 13, 2011 Author Share Posted December 13, 2011 EDIT: now i get it after searching in the forum and hows that easy to create Gui-runcode Link to comment
CapY Posted December 13, 2011 Share Posted December 13, 2011 then he have to rename his topic name as Capy do 'More Stupid questions' I named the topic like that , because i liked it, do you have a problem with it ? Link to comment
Blaawee Posted December 14, 2011 Author Share Posted December 14, 2011 o.k , i have this function dxDrawImage how to make the image front or back Link to comment
CapY Posted December 14, 2011 Share Posted December 14, 2011 Do you even read the wiki? https://wiki.multitheftauto.com/wiki/GuiBringToFront https://wiki.multitheftauto.com/wiki/GuiMoveToBack Link to comment
BinSlayer1 Posted December 14, 2011 Share Posted December 14, 2011 Do you even read the wiki? https://wiki.multitheftauto.com/wiki/GuiBringToFront https://wiki.multitheftauto.com/wiki/GuiMoveToBack Don't be like that. It's not like you don't have a topic full of questions such as "What is the function?" People weren't rude to you and they explained stuff to you even though they could have been rude. Link to comment
Blaawee Posted December 14, 2011 Author Share Posted December 14, 2011 Do you even read the wiki? https://wiki.multitheftauto.com/wiki/GuiBringToFront https://wiki.multitheftauto.com/wiki/GuiMoveToBack i think it's for the gui , i try it and it's not working 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