Jump to content

BinSlayer1

Members
  • Posts

    491
  • Joined

  • Last visited

Posts posted by BinSlayer1

  1. Hi

    I've been getting this window every time I open MTA:SA 1.3.5. No matter what option I choose, the game will work fine.

    I've been told this is a feature actually but for me it's rather annoying and disturbing since the options don't seem to have any effect whatsoever. If I press "X" as in exit the window, the game will also launch fine which makes it pretty redundant.

    Can't the devs get rid of this? Or at least make it so that it would go away on 'Enter' instead of clicking Ok. Or maybe an option to remember my choice as in "Don't show this pop-up again"?

    I'm sure I'm not the only one experiencing this.

    Thanks.

    optimus_e667.png

  2. If you can't script this then don't script it.

    Only script easy stuff until you are ready to go to more advanced stuff.

    Also

    1. We don't script here.

    2. You must make it.

    3. "I can't make it" is not a reason for us to script it.

    understand now?

  3. server event is fired first I'm almost sure

    because client doesnt exist without server. server needs to send data (i.e playing quitting) to client so server knows about the quit long before the client does (might even be a few milliseconds)

    Dunno how that helps you, but I just responded to the original question

  4. To delete a time , /deletetime [number]

    You can't change the name of a toptime that easily. You'll need to figure out an update query for SQL that will do it but it's just too much hassle.. Simply deleting it would be better

  5. You must add resource.resourceName in the acl group: Admin.

    Thanks all guys , it works 100 %

    so you'll just kick players as soon as their ping gets over the limit? What if they have a lagspike?

  6. Ryck, no need to overwrite it in all maps. Maps sent their data to the gamemode.

    So open up race_server.lua, check where lockedtime data is gathered and make sure maps can't override it. Then just set it yourself to true @ resource start and set the time too with setTime()

  7. May I point out that a good anti-highping script will first WARN the player and then give him enough time to fix the problem before kicking him. Also, a good anti-highping script will take notice of people whether or not they are downloading at the time of the ping check. It doesn't make sense kicking someone who's downloading your server resources because he has 1000 ping.

    Try to create these features if you want to be thorough.

  8. Jasper, when the resource starts.. Do you simply want to run that function with a 2-sec timer?

    It won't work because player is not defined. You must define it somehow. But we don't know what you're trying to achieve.

    Should the function run for all players when the resource starts (timer starts) ? It can't run for just 1 player unless this is specifically defined with getPlayerFromName() which is bad scripting

    You can make it run for all players @ start if u use a FOR loop, looping though getElementsByType('player').

    If you want to make this and don't know how, reply again and I'll (or someone else) help.

  9. the second argument of addEventHandler is something like.. the multitude of sources that can trigger it.

    getRootElement() would mean that any element can trigger it

    getResourceRootElement() would mean that only the current resource

    example:

    local marker = createMarker(..)

    addEventHandler('onMarkerHit', marker, functionToExecute)

    this means that onMarkerHit is only triggered via our own 'marker'

    I should also note that your code is wrong. "?" is not defined anywhere.

    Also, player element won't be passed just like that. Unless you know what you're doing, this could be nil.

  10. This is the kind of problem that can be solved very easily by debugging the code like this outside the IF statement.

    outputChatBox(type(number1))

    outputChatBox(tostring(number1))

    This will tell you that the type of number1 variable is BOOLEAN and will also output "nil" in the console meaning nothing is stored in that variable.

    This happens because once you declare number1 as being a PARAMETER in the header of the function, it won't recognize the global value "test" that you set it to in the beginning of the script.

    The problem occurs because onPlayerChat will not send any 3rd parameter to that function, simply because that's how MTA works. Thus sending "nil".

    You can find the list of parameters for onPlayerChat here: https://wiki.multitheftauto.com/wiki/OnPlayerChat

    edit: I know that the problem has been solved by the previous poster but he simply gave the correct code with no explanation.

  11. Can't you cancel the button with cancelevent?

    wtf. don't reply for the sake of it if you have no idea what u talking about.. You can't cancel buttons with scripts.

    ontopic:

    there is no map in the escape menu.. so what map are you talking about? The only map in the escape menu is in the GTA:SA menu not MTA's

    If you mean that you want to forbid a player from seeing the menu then you cannot do this.

    If you mean that you want to remove the transparency from the menu so that the players can't see the gameplay anymore then you can detect when the menu is started by checking onClientKey + isChatBoxInputActive must return false and then simply draw a black picture onto the screen.

    edit: also u gotta check that console is not displayed either I dont remember the function for it you'll have to search the mtasa wiki for it

  12. the only thing wrong with the lua script that will give you some nasty debug errors too is that you need to check the element type and make sure it's a player

    Use this: if getElementType(hitElement) ~= 'player' then return end

    Put it in the first line of the function

  13. search for element model of Yakuza here: https://wiki.multitheftauto.com/wiki/All_Skins_Page

    open s_main.lua in your spawn menu resource.

    after line 18, add this line:

    if skin.modelId == number_here and not isObjectInACLGroup ("user."..getAccountName(getPlayerAccount(client)), aclGetGroup ( "Admin" ) ) then spawn = false end 
    

    Note that you need to replace 'number_here' with the element model of the Yakuza skin and 'Admin' acl name with the acl name u want

  14. wtf... R.y.c.k , does that really work?

    onPlayerCommand should not be able to detect stuff like that..

    Instead, you should be using onPlayerChat and check the first word for '!' character or something. But it's really weird that you say onPlayerCommand works :S

    For all I know, that should only work if the command is "/!dd" not "!dd"

  15. there is no need for all those functions :S
      
    -- Client 
    toggleControl("sprint",false) 
      
    

    rofl, he doesn't want to disable sprinting.. But he believes MTA sprinting is faster than SA-MP sprinting so he wants to alter the maximum sprint speed of the player.

×
×
  • Create New...