Rolyy Posted July 2, 2010 Share Posted July 2, 2010 I might not be good here for asking help about scripting but I got no where to post or get help.. =\ And I am truely thankfull if someone could help me out with adding multiple commands. Example: a peace of coding that has made.. if (strcmp("/command", cmdtext, true, 10) == 0) { SendClientMessage(playerid,COLOR_WHITE,"The text appears after the command..."); return 1; } Example: This is what i sort of want. but this AINT RIGHT and I want to know how to do it right.. if (strcmp("/command1" || "/command2 || "/command3" , cmdtext, true, 10) == 0) { SendClientMessage(playerid,COLOR_WHITE,"The text appears after the command..."); return 1; } I am Really thankfull if smoeone could help me out. Sorry agian for possible wrong posting Link to comment
robhol Posted July 2, 2010 Share Posted July 2, 2010 MTA commands are created with addCommandHandler. Your problem can be fixed by doing something like this: function myFunction(player, command, argument) -- do.. well, whatever end addCommandHandler("cake", myFunction) addCommandHandler("pie", myFunction) addCommandHandler("muda-da", myFunction) Also, uh... there is a whole subforum named "Scripting", and you still posted it here? Link to comment
Rolyy Posted July 2, 2010 Author Share Posted July 2, 2010 oh yea forgot the notice... im coding in samp.. not in MTA and i possible missed the subform scripting X_X Link to comment
50p Posted July 2, 2010 Share Posted July 2, 2010 Not a subforum but you missed forum completely... We don't deal with SA-MP in ANY WAY. So you better find SA-MP forum yourself. Link to comment
robhol Posted July 5, 2010 Share Posted July 5, 2010 Or just switch to the clearly better mod.. Link to comment
Xierra Posted July 6, 2010 Share Posted July 6, 2010 Hey hey instead of moving to SA-MP, go here. It's better. I played SA-MP too before, but this one's my choice. Go here for wiki: https://wiki.multitheftauto.com/wiki/Main_Page You'll find it easier to script here. Btw, the scripting language is "LUA" in MTA SA and "PAWN" which is used on SA-MP. Remember that. Anyway, don't hesitate to ask, 50p was one of the good scripter here, he could help you in any way. Everyone else is kind at helping too. 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