Jump to content

Kenix

Retired Staff
  • Posts

    4,121
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by Kenix

  1. папробуй переустанови мта или скачай по новее версию от сюда https://nightly.multitheftauto.com/ может быть проблема решится
  2. may be the whole problem in the script?
  3. No but as you can get around like a cheat I know that some servers have a script spawn protect. likely to script is not correct
  4. i have this script but I still kick function saveSpawn ( ) startSaveSpawn() end addEventHandler ( "onClientPlayerSpawn", getLocalPlayer(), saveSpawn ) function startSaveSpawn () setElementAlpha(getLocalPlayer(), 50) setElementData(getLocalPlayer() , "sp_prot", true ); setTimer(removeSaveSpawn,8000,1) end function removeSaveSpawn () setElementData(getLocalPlayer() , "sp_prot", false ); setElementAlpha(getLocalPlayer(), 255) end function saveSpawn ( ) if getElementData( source, "sp_prot" ) then cancelEvent() end; end addEventHandler ( "onClientPlayerDamage", getLocalPlayer(), saveSpawn )
  5. please help me a lot to do spawn protect script but due to the anti-cheat MTA he kick a player. function saveSpawn ( ) startSaveSpawn() end addEventHandler ( "onClientPlayerSpawn", getLocalPlayer(), saveSpawn ) function startSaveSpawn () noSpawnKill = exports.extrahealth:setElementExtraHealth ( getLocalPlayer(), 100000 ) setElementAlpha(getLocalPlayer(), 50) setTimer(removeSaveSpawn,8000,1) end function removeSaveSpawn () exports.extrahealth:takeElementExtraHealth(getLocalPlayer(),noSpawnKill) setElementAlpha(getLocalPlayer(), 255) end
  6. Kenix

    Ping

    https://wiki.multitheftauto.com/wiki/GetPlayerPing Omg, i don't know that function, sorry for my useless post T_T Lol
  7. Kenix

    Ping

    https://wiki.multitheftauto.com/wiki/GetPlayerPing
  8. i am have this script in server side function spawncar() local spawnthecar = createVehicle ( 566, 1175,1374.11,10.419050216675 ) warpPedIntoVehicle(source, spawnthecar) end
  9. This works !!! great thanks cheers dude
  10. addEventHandler( "onClientResourceStart", getResourceRootElement(getThisResource()), function() bindKey ( "F6", "down", showMoneySend) end ) function showMoneySend () if ( guiGetVisible ( GUIEditor_Window[111] ) == false ) then showMoneySendStart() elseif ( guiGetVisible ( GUIEditor_Window[111]) == true ) then guiSetVisible ( GUIEditor_Window[111], false ) showCursor(false) end end function showMoneySendStart() showCursor(true) GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Grid = {} GUIEditor_Image = {} GUIEditor_Window[111] = guiCreateWindow(334,328,668,565,"Send Money Panel (F6 close/open )",false) --GUIEditor_Grid[111] = guiCreateGridList(35,74,222,443,false,GUIEditor_Window[111]) --guiGridListSetSelectionMode(playerList,2) --for i = 1, 1 do -- guiGridListAddRow(GUIEditor_Grid[111]) --end --guiGridListAddColumn(GUIEditor_Grid[111],"Players",0.9) GUIEditor_Edit[111] = guiCreateEdit(388,102,250,48,"",false,GUIEditor_Window[111]) GUIEditor_Label[111] = guiCreateLabel(305,109,72,36,"Player:",false,GUIEditor_Window[111]) guiLabelSetColor(GUIEditor_Label[111],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[111],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[111],"left",false) GUIEditor_Edit[112] = guiCreateEdit(389,185,248,50,"",false,GUIEditor_Window[111]) GUIEditor_Label[112] = guiCreateLabel(301,194,71,34,"Money:",false,GUIEditor_Window[111]) guiLabelSetColor(GUIEditor_Label[112],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[112],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[112],"left",false) GUIEditor_Image[111] = guiCreateStaticImage(389,396,246,160,"login/logo.png",false,GUIEditor_Window[111]) GUIEditor_Label[113] = guiCreateLabel(294,279,72,29,"Your money: $",false,GUIEditor_Window[111]) guiLabelSetColor(GUIEditor_Label[113],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[113],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[113],"left",false) GUIEditor_Button[111] = guiCreateButton(277,490,94,31,"Give!",false,GUIEditor_Window[111]) playersList = guiCreateGridList(35,74,222,443,false,GUIEditor_Window[111]) local columnplayersList = guiGridListAddColumn(playersList, "Players", 0.85) if (columnplayersList) then for id, playeritem in ipairs(getElementsByType("player")) do local rowplayersList = guiGridListAddRow(playersList) guiGridListSetItemText(playersList, rowplayersList, columnplayersList, getPlayerName(playeritem), false, false) end end end function onUpdateMoneyplayersList() guiGridListClear(playersList) for id, playeritem in ipairs (getElementsByType("player")) do local rowplayersList = guiGridListAddRow(playersList) guiGridListSetItemText(playersList, rowplayersList, 1, getPlayerName(playeritem), false, false) end end addEventHandler("onClientPlayerJoin", getRootElement(), onUpdateMoneyplayersList) addEventHandler("onClientPlayerQuit", getRootElement(), onUpdateMoneyplayersList) addEventHandler("onClientPlayerChangeNick", getRootElement(), onUpdateMoneyplayersList) function giveMoneySend ( ) edit1 = guiGetText ( GUIEditor_Edit[111] ) edit2 = guiGetText ( GUIEditor_Edit[112] ) triggerServerEvent ( "theMoney", getLocalPlayer(), edit1,edit2 ) end addEventHandler ( "onClientGUIClick", GUIEditor_Button[111], giveMoneySend, false ) --addEventHandler ( "onClientGUIClick", GUIEditor_Button[111], giveMoneySend ) --addEventHandler ( "onClientGUIClick", giveMoneySend, GUIEditor_Button[111], false ) addEventHandler( "onClientResourceStart", getResourceRootElement(getThisResource()), function() outputChatBox("1") addEventHandler ( "onClientGUIClick", playersList, onClickPlayerList, false ) end ) function onClickPlayerList() outputChatBox("2") if source == playersList then local playergrd = guiGridListGetItemText(playersList,guiGridListGetSelectedItem(playersList),1) guiSetText(GUIEditor_Edit[111],tostring(playergrd)) end end
  11. no errors in debugscript be it with something else connected?
  12. not work in the ChatBox
  13. can not appear it with something with a different reason?
  14. Solidsnake14 , try to use to 0. ...... 0. ... at least from the pictures so works. example: GUIEditor_Image[81] = guiCreateStaticImage(0.740,0.770,0.250,0.250,"login/logo.png",true) I did not know if it works with the dx but at least all users, it will be the same size.
  15. Thank you very much but how to solve this problem here is the code but still does not go to player nick name to GUIEditor_Edit[111] maybe this function onClickPlayerList() if source == playersList then local playergrd = guiGridListGetItemText(playersList,guiGridListGetSelectedItem(playersList),1) guiSetText(GUIEditor_Edit[111],playergrd) end end addEventHandler ( "onClientGUIClick", playersList, onClickPlayerList, false )
  16. Kenix

    Moeny saving

    use this function playerLogin (thePreviousAccount, theCurrentAccount, autoLogin) if not (isGuestAccount (getPlayerAccount (source))) then local accountData = getAccountData (theCurrentAccount, "savemoney.money") if (accountData) then local playerMoney = getAccountData (theCurrentAccount, "savemoney.money") setPlayerMoney (source, playerMoney) end end end addEventHandler ("onPlayerLogin", getRootElement(), playerLogin) function onQuit (quitType, reason, responsibleElement) if not (isGuestAccount (getPlayerAccount (source))) then account = getPlayerAccount (source) if (account) then setAccountData (account, "savemoney.money", tostring (getPlayerMoney (source))) end end end addEventHandler ("onPlayerQuit", getRootElement(), onQuit)
  17. here dude function showMoneySendStart() showCursor(true) GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Grid = {} GUIEditor_Image = {} GUIEditor_Window[111] = guiCreateWindow(334,328,668,565,"Send Money Panel (F6 close/open )",false) GUIEditor_Edit[111] = guiCreateEdit(388,102,250,48,"",false,GUIEditor_Window[111]) GUIEditor_Label[111] = guiCreateLabel(305,109,72,36,"Player:",false,GUIEditor_Window[111]) guiLabelSetColor(GUIEditor_Label[111],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[111],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[111],"left",false) GUIEditor_Edit[112] = guiCreateEdit(389,185,248,50,"",false,GUIEditor_Window[111]) GUIEditor_Label[112] = guiCreateLabel(301,194,71,34,"Money:",false,GUIEditor_Window[111]) guiLabelSetColor(GUIEditor_Label[112],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[112],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[112],"left",false) GUIEditor_Image[111] = guiCreateStaticImage(389,396,246,160,"login/logo.png",false,GUIEditor_Window[111]) GUIEditor_Label[113] = guiCreateLabel(294,279,72,29,"Your money: $",false,GUIEditor_Window[111]) guiLabelSetColor(GUIEditor_Label[113],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[113],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[113],"left",false) GUIEditor_Button[111] = guiCreateButton(277,490,94,31,"Give!",false,GUIEditor_Window[111]) playersList = guiCreateGridList(35,74,222,443,false,GUIEditor_Window[111]) local columnplayersList = guiGridListAddColumn(playersList, "Players", 0.85) if (columnplayersList) then for id, playeritem in ipairs(getElementsByType("player")) do local rowplayersList = guiGridListAddRow(playersList) guiGridListSetItemText(playersList, rowplayersList, columnplayersList, getPlayerName(playeritem), false, false) end end end addEventHandler( "onClientGUIClick", playersList, function() local rowl, coll = guiGridListGetSelectedItem( source ); if rowl >= 0 and coll >= 0 then local textik = guiGridListGetItemText( source, rowl, coll ); guiSetText( GUIEditor_Edit[111], textik ); end; end, false );
  18. Kenix

    Help

    download latest resources http://code.google.com/p/mtasa-resources/downloads/list
  19. does not work the event onClientGUIClick. it does not print when you click on the nickname nick. addEventHandler( "onClientResourceStart", getResourceRootElement(getThisResource()), function() bindKey ( "F6", "down", showMoneySend) end ) function showMoneySend () if ( guiGetVisible ( GUIEditor_Window[111] ) == false ) then showMoneySendStart() elseif ( guiGetVisible ( GUIEditor_Window[111]) == true ) then guiSetVisible ( GUIEditor_Window[111], false ) showCursor(false) end end function showMoneySendStart() showCursor(true) GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Grid = {} GUIEditor_Image = {} GUIEditor_Window[111] = guiCreateWindow(334,328,668,565,"Send Money Panel (F6 close/open )",false) GUIEditor_Edit[111] = guiCreateEdit(388,102,250,48,"",false,GUIEditor_Window[111]) GUIEditor_Label[111] = guiCreateLabel(305,109,72,36,"Player:",false,GUIEditor_Window[111]) guiLabelSetColor(GUIEditor_Label[111],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[111],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[111],"left",false) GUIEditor_Edit[112] = guiCreateEdit(389,185,248,50,"",false,GUIEditor_Window[111]) GUIEditor_Label[112] = guiCreateLabel(301,194,71,34,"Money:",false,GUIEditor_Window[111]) guiLabelSetColor(GUIEditor_Label[112],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[112],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[112],"left",false) GUIEditor_Image[111] = guiCreateStaticImage(389,396,246,160,"login/logo.png",false,GUIEditor_Window[111]) GUIEditor_Label[113] = guiCreateLabel(294,279,72,29,"Your money: $",false,GUIEditor_Window[111]) guiLabelSetColor(GUIEditor_Label[113],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[113],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[113],"left",false) GUIEditor_Button[111] = guiCreateButton(277,490,94,31,"Give!",false,GUIEditor_Window[111]) playersList = guiCreateGridList(35,74,222,443,false,GUIEditor_Window[111]) local columnplayersList = guiGridListAddColumn(playersList, "Players", 0.85) if (columnplayersList) then for id, playeritem in ipairs(getElementsByType("player")) do local rowplayersList = guiGridListAddRow(playersList) guiGridListSetItemText(playersList, rowplayersList, columnplayersList, getPlayerName(playeritem), false, false) end end end function onUpdateMoneyplayersList() guiGridListClear(playersList) for id, playeritem in ipairs (getElementsByType("player")) do local rowplayersList = guiGridListAddRow(playersList) guiGridListSetItemText(playersList, rowplayersList, 1, getPlayerName(playeritem), false, false) end end addEventHandler("onClientPlayerJoin", getRootElement(), onUpdateMoneyplayersList) addEventHandler("onClientPlayerQuit", getRootElement(), onUpdateMoneyplayersList) addEventHandler("onClientPlayerChangeNick", getRootElement(), onUpdateMoneyplayersList) function giveMoneySend ( ) edit1 = guiGetText ( GUIEditor_Edit[111] ) edit2 = guiGetText ( GUIEditor_Edit[112] ) triggerServerEvent ( "theMoney", getLocalPlayer(), edit1,edit2 ) end addEventHandler ( "onClientGUIClick", giveMoneySend, GUIEditor_Button[111], false ) addEventHandler( "onClientGUIClick", playersList, function() local rowl, coll = guiGridListGetSelectedItem( source ); if rowl >= 0 and coll >= 0 then local textik = guiGridListGetItemText( source, rowl, coll ); guiSetText( GUIEditor_Edit[111], textik ); end; end, false );
  20. I know but why killer == 57 and not killerWeapon == 57 ?? script not work killerWeapon == 57 because what it says on the wiki that need to check exactly "killerWeapon: an integer representing the killer weapon or the death reason."
  21. script not work I think the problem is "if elseif esle"
×
×
  • Create New...