-
Posts
2,973 -
Joined
-
Last visited
-
Days Won
3
Everything posted by 50p
-
http://development.mtasa.com/index.php? ... ddObserver viewtopic.php?f=91&t=19202 Those sites may help.
-
I wanted to mention it in my first post, somehow I've forgotten. Anyway, Vercetti, try the example ( http://development.mtasa.com/index.php? ... olShapeHit ) and don't forget to create sphere on client's side.
-
In your case deathSphere is server-sided. Why don't you create the shape in client-side script?
-
http://development.mtasa.com/index.php? ... olShapeHit Read parameters section and compare it to yours. Also, when they enter (hit) the colshape do a check it the player is local player.
-
Incorrect. The wiki pages simply mean that it may be confusing for the *scripter*. However, if you don't find it confusing as a scripter, there is no problem at all with giving the handler function the same name as the event. It doesn't say "... as you may be confued", it says "Lua may confuse them" - Lua - it's not scripter - may - "may confuse" not "will confuse", may but doesn't have to - them - functions and events, not scripters You can call them the same, but you've been warned it may confuse the Lua. The problem described above may be a bug in MTA itself.
-
Yae but then the vehicles that are already in - game (not spawned) blow up and they never come back, that's what I am trying to say. Are you saying your vehicles (from .map or created when resource starts) explode & never respawn (but should respawn) and the vehicles created using command explode & respawn (but should not respawn)? What I understand from the first post is: You vehicles spawned by the spawn point respawn after explosion and vehicles created using command respawn too (which should not). Is that what you want? You want vehicles created by players (using command) to never appear after they explode but vehicles created with resource to respawn normally?
-
You should assign vehicles spawned by command to a table and then when they explode just destroy it (destroyElement) and remove them from the table. That way you know which vehicles are spawned by players.
-
Have you tried THIS?
-
I think you mean team, don't you? So when players press TAB they'll see Admins team and players who are admins in it. Is that what you want? If so, you'll have to make a team (createTeam, that will automatically create that "group" in the scoreboard). And assign admins when they logIn to the Admins team.
-
Look here: You want to get "player" element and assign it to the playername variable. What do you need player element for if thePlayer is already what you need? Anyways, I'll have a deeper look into it if you'll want to give up an I'll have some time.
-
What are the errors?
-
Line 11, remove local and just leave setElementData
-
Do the same think... but give them health. Do you know what wiki is? If you do why don't you use it? You will be proud of yourself if you make something yourself. setElementHealth
-
Add some outputChatBox or outputDebugString messages and see if they gets displayed if they will not, post your code here.
-
Like tma said: "I have this running on a timer in the client", that is: "I call this function using timer in client-side script". setTimer when the resource start (onClientResourceStart) and you should be ok.
-
That's the way it should be made. You get the data that player's entered and send it to the server-side script, which takes care of logging players in.
-
Try this one: function colorChart ( ) showCursor ( true ) colormenu = guiCreateWindow ( 0.15, 0.53, 0.7, 0.34, "The Color IDs", true ) closemenu = guiCreateButton ( 0.4, 0.85, 0.20, 0.15, "Close", true, colormenu ) addEventHandler ( "onClientGUIClick", closemenu, windowClose ) guiWindowSetMovable ( colormenu, true ) guiWindowSetSizable ( colormenu, true ) guiCreateStaticImage ( 0.15, 0.33, 0.6, 0.33, "img/colorchart.png", true, colormenu ) end function windowClose ( ) if source == closemenu then destroyElement ( colormenu ) removeEventHandler( "onClientGUIClick", closemenu, windowClose ) showCursor ( false ) end end
-
Add some outputChatBox messages to closeWindow function and see if it's printed when you press the button.
-
Show us your login function. You don't have it! Do you use wiki? - logIn Also, if you get such error: "attempt to call global 'login' " in most cases it means you don't have such function. If you try to use server-side function in client-side script (and vice versa), you'll get the same error because such function doesn't exist. Remember that.
-
Yes, theResource arg will be always "player" it will not be resource because that's how addCommandHandler works. So the function will always stop (return) after the check. Also, why do you destroy the window when you click the button? Hide it instead (guiSetVisible).
-
I'll continue improving it when my new PC will work as it should because my 2nd 1GB RAM stick "crashing" my PC, so I wait for help on other forums, hopefully they'll help me. It may require reinstalling OS. I don't want to install every software because I'll have to do it again... sorry if I disappointed you.
-
As someone said, you could make multiple pages.
-
guiSetInputEnabled: Make simple form and a function attached to a submit button. Use triggerServerEvent to send the data that player's entered and do a check if the data is correct (using getAccount). Always look on wiki: http://development.mtasa.com/index.php?title=Main_Page
-
It must be a string. So use "colorchart.png" not colorchart.png
-
What exacly do you want? Is your script not working as you want?