DazzaJay Posted January 20, 2008 Author Share Posted January 20, 2008 Just one thing before i start attempting to fuck this up royally..... Define: boolean and somthing thats off topic.... You know how theres the ability in MTA DM to host Server-Side custom vehicles (i know how to do that also) But What about a Server-Side american.gxt file... so i could put my "Real Car Names" mod on the game server, so when people get in and out of cars.... it shows the real car name.... such as "Sultan" would be "Subaru Impreza" anyway, is it Possible to put the american.gxt file on the server side so that everyone in the game server could see the vehi names? You've got to try to code it yourself If i could code it myself.. i wouldent be asking for help. Link to comment
norby89 Posted January 20, 2008 Share Posted January 20, 2008 Just one thing before i start attempting to this up royally.....Define: boolean http://en.wikipedia.org/wiki/Boolean_datatype, first thing I found in google *pats google* and somthing thats off topic....You know how theres the ability in MTA DM to host Server-Side custom vehicles (i know how to do that also) But What about a Server-Side american.gxt file... so i could put my "Real Car Names" mod on the game server, so when people get in and out of cars.... it shows the real car name.... such as "Sultan" would be "Subaru Impreza" anyway, is it Possible to put the american.gxt file on the server side so that everyone in the game server could see the vehi names? anything that involves modyfing files, american.gxt, weapon.cfg, handling.cfg etc isn't possible yet Link to comment
DazzaJay Posted January 20, 2008 Author Share Posted January 20, 2008 Well, i have been working on this all night, and this is what i have. if isChatBoxInputActive() == true then guiCreateStaticImage( "data/chatbubble.png" ) end if isChatBoxInputActive() == false then guiDestroyObject( "data/chatbubble.png" ) end Link to comment
50p Posted January 20, 2008 Share Posted January 20, 2008 You're almost there. Just learn a bit more. KeyBind should call a function which would create the image on all of the players' screen. Link to comment
DazzaJay Posted January 20, 2008 Author Share Posted January 20, 2008 ok, i have had enough of this crap. 5 DAYS this thread has been here, and none of you have helped, i could have figured this shit out so far on my own. Do you idiots really think that if i COULD have done this on my own, i would have asked for help? No, i wouldent have. I asked for help, and what do i get? a bunch of fucks who think they are better than me, shitting in my face. Nah, thanks for your help, Oh thats right, you havent been any help. Link to comment
TmM_DEVIL Posted January 20, 2008 Share Posted January 20, 2008 people really need start helping every one out with coding sa-mp has a hell of allot of coders on there forums helping each other out and some relay big scripts running we all want try get this more popular than sa-mp but dissing people because they don't no code is not helping Link to comment
50p Posted January 20, 2008 Share Posted January 20, 2008 If you ask for ready code and get it once, you'll come back ask for code again and again and again... until we make it for you. When MTA was released (dp1) I started reading wiki. I knew what you know now, and now I know a bit more and understand what you may feel like now. I don't ask much for help because my way of getting used to programming is learning myself by reading a lot. But if you ask for ready-working-code then you should try reading a lot, and then ask some lil' questions about "what is wrong with my code?", "why isn't it working?". And again don't ask for lots of code. Don't get offended because everybody must have their first time. Do you think scientist was scientist from the day he was born? No, he must learn before he becomes one. Also, MTA was released 2 weeks ago, and do you all expect everyone know everything just to help you? We must first learn to help others (that's what I am doing). I gave you exact directions to functions you'll be in need of. Link to comment
DazzaJay Posted January 20, 2008 Author Share Posted January 20, 2008 this will never get as big as samp if the community dosent help each other. Every Time i have known the awnser to somones question, i have posted it, With a full explenation of what it does, and how it works, all i want is to see the same in return. Link to comment
DazzaJay Posted January 20, 2008 Author Share Posted January 20, 2008 AI gave you exact directions to functions you'll be in need of. Your directions made no fucking sence. and then your all like "your almost there" I DONT FUCKING KNOW HOW TO GET IT TO FUCKING WORK, AND NONE OF THE FUCKING WIKI MAKES ANY FUCKING SENCE. FUCK. Link to comment
XetaQuake Posted January 20, 2008 Share Posted January 20, 2008 i am on DazzaJay side...not all People are scripter...All have their own "job" i think for the big scripters here it is a time of 30 minutes of coding. i am sure that 70% of all server-admins want to have this code... I dont think that scripters have no fun by coding...i am (beginner/leisure) mapper for games like hl2 etc and i have fun to build it, although i spend many hours in it. and i am lucky when People say "good job" or "realy nice, make more i cant wait, pleas" ... and then i don't say "Do it yourself" By the way: DazzaJay has tried it! (sorry for bad englisch) Link to comment
Sintax Posted January 21, 2008 Share Posted January 21, 2008 If you're just looking for someone to do something for you, maybe this should be in the suggestions forum. Link to comment
DazzaJay Posted January 21, 2008 Author Share Posted January 21, 2008 If you're just looking for someone to do something for you, maybe this should be in the suggestions forum. But its not a suggestion. its a request. Link to comment
50p Posted January 21, 2008 Share Posted January 21, 2008 AI gave you exact directions to functions you'll be in need of. Your directions made no sence. and then your all like "your almost there" I DONT KNOW HOW TO GET IT TO WORK, AND NONE OF THE WIKI MAKES ANY SENCE. . If my directions have no sense to you then there is no way we can help you yet. No body has got time now to help you if they want to help themselves. MTA is fresh yet and everyone is testing functions, updating wiki, and stuff. If wiki doesn't help you to learn scripting for MTA then you'll always post requests, you'll never learn LUA. I remember the time I first started learning programming. I didn't even know that software (all the applications we use) are written in some kind of code! I didn't even know that there are 10s of programming/scripting languages. I had to spend days just to write a simple calculator in C++. Then I started learning PAWN, it was nightmare to get answers from people like Y_Less who's just giving hints. I didn't understand what is meant by: "put this code in OnPlayerConnect"! It took me couple of months to learn PAWN. Once I have learnt something it is easier to learn other languages including LUA. I have had many situations that I wanted to throw my keyboard through the window! Think about my start and compare it with yours. Link to comment
lil Toady Posted January 21, 2008 Share Posted January 21, 2008 Set up a timer to check when user chat input is activated client side, when it is trigger a server event that would trigger an event on all other client's to show the icon. The hardest thing i see is showing the icon, but it still possible, you have to check if player is on screen, then get world from screen position and attach an icon to it. Just try to start getting the chat input atm, then go to syncing it and do the icon last. If you start it yourself and post the code you get im sure a lot of people, me too will be helping with it and show the right direction. Functions are documented on the MTA wiki. It's just the fact that you need the code, others are not obliged to go and write it. Link to comment
DazzaJay Posted January 22, 2008 Author Share Posted January 22, 2008 why not just use the same system that Capture the orb uses for showing the orb above a player.... except instead of the orb, a .png image. Link to comment
50p Posted January 22, 2008 Share Posted January 22, 2008 Because the orb is not a 2d image. Link to comment
khepra Posted January 22, 2008 Share Posted January 22, 2008 I'm thinking about giving a go at this, but I'm new to the whole client/server dynamic, so I'll need some pointers. Right now I'm thinking I would have an event triggered when a person hits their chat button that adds them to a list of currently chatting players. Then for each player, I draw in the appropriate icon for the appropriate players (in the list and in range) at the appropriate place (using getScreenFromWorldPosition) for their screen at the appropriate time (using the "onClientRender") . My question is how should (would) this be split up between server and client code. I would assume that the list of currently chatting players should be provided by the server while the drawing and timing elements should be done client side. Again, I'm new to client coding in particular, so I'm mostly not sure how client and server code communicate, but I appreciate any help I can get Link to comment
50p Posted January 22, 2008 Share Posted January 22, 2008 To call a function from server in client script use: triggerServerEvent To call a function from client in server script use: triggerClientEvent But first you'll have to addEvent in a script which than may be called. Check these functions: http://development.mtasa.com/index.php? ... _functions Link to comment
khepra Posted January 22, 2008 Share Posted January 22, 2008 So, as I understand it, the only communication between client and server scripts is through events, ie no variables, correct? Also, if a client script triggers a server event, obviously the event is executed on the server side. But, in the reverse scenario, when the server triggers a client event, is the event triggered for every client? I would assume it does, but I just want to be clear. Link to comment
50p Posted January 23, 2008 Share Posted January 23, 2008 http://development.mtasa.com/index.php? ... lientEvent You can see there is a param "theElement", this is where you can specify on which client you want to trigger the event. Use wiki first, then ask. Link to comment
khepra Posted January 23, 2008 Share Posted January 23, 2008 Yeah, I saw that after I asked, but as in anything else, a human voice is much more reassuring than a cold wiki Link to comment
AlienX Posted January 24, 2008 Share Posted January 24, 2008 I love this idea!... do you mind if i were to "Borrow" that speach icon? - might code this in my freeroam 2nite! *edit* could also shove AFK n stuff above their heads too! *edit2* Just read this: the good thing is that i belive you wouldent need to host the image on the server, as it is located in the game defaultly! its called "badchat" and is located in the /san andreas/models/txd/LD_CHAT.txd file! So, MINE Link to comment
DazzaJay Posted January 24, 2008 Author Share Posted January 24, 2008 lol, good to see that somone else wants it can i be a slack bitych and get a copy of it when your done? as i dont want to learn LUA for like 3 odd scripts... if you know what i mean. Link to comment
khepra Posted January 24, 2008 Share Posted January 24, 2008 I've got it working on my server right now. I think I'll post the code when I get a chance, since I'm sure it's horribly inefficient right now, and I wouldn't mind a couple more eyes checking my code 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