Jump to content

Kenix

Retired Staff
  • Posts

    4,121
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by Kenix

  1. Kenix

    help with script

    outputChatBox write: Player Resource start false false false userdata: 00001FB2 Player Element Data Change 0 false false userdata: 00001FB2 Player Element Data Change 0 1 false userdata: 00001FB2 Player Element Data Change 0 1 25 userdata: 00001FB2 addEventHandler ( "onClientElementDataChange", gme, function ( dataName, player ) local EXP2 = getElementData(gme,"Experience") local Level2 = getElementData(gme,"Level") local exptolevel2 = getElementData(gme,"NextLevel") outputChatBox ( "Player Element Data Change "..tostring(EXP2).." "..tostring(Level2).." "..tostring(exptolevel2).." "..tostring(gme)) guiSetText ( EXPLabel, "EXP "..EXP2.." / "..exptolevel2) guiSetText ( LevelsLabel, "Level "..Level2) end )
  2. Kenix

    help with script

    the same labels are not visible
  3. Kenix

    help with script

    No, again just after the restart of the resource works ...
  4. Kenix

    help with script

    I know Here on this I use onClientResourceStart
  5. Kenix

    help with script

    when a player join the server but gooey not appear if you dont use an event onClientPlayerJoin , only onClientResourceStart.
  6. Kenix

    help with script

    thanks for the advice, I use notepad + + but it still shows Labels just after the restart of the resource
  7. Kenix

    help with script

    No not all the same when I go, nothing appears
  8. So just do the script works but when people comes to record labels, etc do not appear but after restart everything is working standards is the problem I think with onClientResourceStart please help anyone faced with this problem. client local gme = getLocalPlayer() addEventHandler( "onClientResourceStart", getResourceRootElement(getThisResource()), function( ) local EXP1 = getElementData(gme,"Experience:",tostring) local Level1 = getElementData(gme,"Level:",tostring) local exptolevel1 = getElementData(gme,"NextLevel:",tostring) outputChatBox ( "Player Resource start "..tostring(EXP1).." "..tostring(Level1).." "..tostring(exptolevel1).." "..tostring(gme)) LevelsLabel = guiCreateLabel(0.8578,0.6104,0.125,0.0244,"Level: "..Level1,true) EXPLabel = guiCreateLabel(0.8578,0.6387,0.125,0.0244,"EXP: "..EXP1.." / "..exptolevel1,true) end ) addEventHandler ( "onClientElementDataChange", gme, function ( dataName, player ) local EXP2 = getElementData(gme,"Experience:",tostring) local Level2 = getElementData(gme,"Level:",tostring) local exptolevel2 = getElementData(gme,"NextLevel:",tostring) guiSetText ( EXPLabel, "EXP: "..EXP2.." / "..exptolevel2) guiSetText ( LevelsLabel, "Level: "..Level2) end ) server function JoinStartLevel() -- готово local EXP = setElementData(source,"Experience:",0) local Level = setElementData(source,"Level:",1) local exptolevel = setElementData ( source, "NextLevel:", 25 ) outputDebugString("PLayer Join "..tostring(EXP,Level,exptolevel)) end addEventHandler("onPlayerJoin", getRootElement(),JoinStartLevel)
  9. сегодня начал делать систему прокачки и наткнулся на некоторые проблемы серв function JoinStartLevel() -- готово local EXP = setElementData(source,"Experience:",0) local Level = setElementData(source,"Level:",1) local exptolevel = setElementData ( source, "NextLevel:", 25 ) outputDebugString("PLayer Join "..tostring(EXP,Level,exptolevel)) end addEventHandler("onPlayerJoin", getRootElement(),JoinStartLevel) клиент local gme = getLocalPlayer() addEventHandler( "onClientResourceStart", getResourceRootElement(getThisResource()), function( ) local EXP1 = getElementData(gme,"Experience:",tostring) local Level1 = getElementData(gme,"Level:",tostring) local exptolevel1 = getElementData(gme,"NextLevel:",tostring) outputChatBox ( "Player Resource start "..tostring(EXP1).." "..tostring(Level1).." "..tostring(exptolevel1).." "..tostring(gme)) LevelsLabel = guiCreateLabel(0.8578,0.6104,0.125,0.0244,"Level: "..Level1,true) EXPLabel = guiCreateLabel(0.8578,0.6387,0.125,0.0244,"EXP: "..EXP1.." / "..exptolevel1,true) end ) addEventHandler ( "onClientElementDataChange", gme, function ( dataName, player ) local EXP2 = getElementData(gme,"Experience:",tostring) local Level2 = getElementData(gme,"Level:",tostring) local exptolevel2 = getElementData(gme,"NextLevel:",tostring) guiSetText ( EXPLabel, "EXP: "..EXP2.." / "..exptolevel2) guiSetText ( LevelsLabel, "Level: "..Level2) end ) итак вобще скрипт работает но когда чел заходит лейблы и пр не появляются но после рестарта всё работает норм в чём проблема я думаю что с onClientResourceStart помогите пожалуйста кто сталкивался с этой проблемой.
  10. скриптинг немного напоминает самп теже команды xml и прочее но потряс логин и регистрация нелегче было бы сделать эвентом регистрацию а не командой? ну а так в целом претензий нет
  11. не тупи выложи мету и луа строки ...
  12. лучше бы продал мод советую . Но я прошу не кидай на комьюнити а то и так много уже стало нубо серверов(особенно русских плеев) я не хочу чтобы их становилось всё больше и больше!.я думаю со мной многие согласятся по этому поводу. за мод 5+ молодец
  13. Thank you very much it works thanks again
  14. dude I do not know what the problem is When I click on the button, nothing happens function giveMoneySend ( ) outputChatBox("1") edit1 = guiGetText ( GUIEditor_Edit[111] ) edit2 = guiGetText ( GUIEditor_Edit[112] ) triggerServerEvent ( "theMoney", getLocalPlayer(),edit1,edit2) end addEventHandler ( "onClientGUIClick",GUIEditor_Button[111], giveMoneySend) outputChatBox not write Here is the complete script GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Grid = {} GUIEditor_Image = {} 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[111] = guiCreateWindow(0.2609,0.3203,0.5219,0.5518,"Send Money Panel (F6 close/open )",true) GUIEditor_Edit[111] = guiCreateEdit(0.5808,0.1805,0.3743,0.0850,"",true,GUIEditor_Window[111]) GUIEditor_Label[111] = guiCreateLabel(0.4566,0.1929,0.1078,0.0637,"Player:",true,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(0.5823,0.3274,0.3713,0.0885,"",true,GUIEditor_Window[111]) GUIEditor_Label[112] = guiCreateLabel(0.4506,0.3434,0.1063,0.0602,"Money:",true,GUIEditor_Window[111]) guiLabelSetVerticalAlign(GUIEditor_Label[112],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[112],"left",false) GUIEditor_Image[111] = guiCreateStaticImage(0.5823,0.7009,0.3683,0.2832,"login/logo.png",true,GUIEditor_Window[111]) GUIEditor_Label[113] = guiCreateLabel(0.4401,0.4938,0.2575,0.2283,"Your mone: $",true,GUIEditor_Window[111]) guiSetText(GUIEditor_Label[113],"Your money: $ "..getPlayerMoney (getLocalPlayer())) guiLabelSetColor(GUIEditor_Label[113],51,255,0) guiLabelSetVerticalAlign(GUIEditor_Label[113],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[113],"left",false) GUIEditor_Button[111] = guiCreateButton(0.4147,0.8673,0.1407,0.0549,"Give!",true,GUIEditor_Window[111]) playersList = guiCreateGridList(0.0524,0.1310,0.3323,0.7841,true,GUIEditor_Window[111]) addEventHandler ( "onClientGUIClick", playersList, onClickPlayerList, false ) 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 ( ) outputChatBox("1") edit1 = guiGetText ( GUIEditor_Edit[111] ) edit2 = guiGetText ( GUIEditor_Edit[112] ) triggerServerEvent ( "theMoney", getLocalPlayer(),edit1,edit2) end addEventHandler ( "onClientGUIClick",GUIEditor_Button[111], giveMoneySend) function onClickPlayerList() if source == playersList then local playergrd = guiGridListGetItemText(playersList,guiGridListGetSelectedItem(playersList),1) guiSetText(GUIEditor_Edit[111],tostring(playergrd)) end end
  15. does not help maybe all is not the problem
  16. i fixed not work function giveThisCash(playerNick, amount) local cash = getPlayerMoney( source ) local giveplayer = getPlayerFromName ( playerNick ) local playername = getPlayerName ( source ) local moneytogive = tonumber(amount) if( cash < moneytogive ) then if getElementData( source, "Lang" ) == "Rus" then outputChatBox ( "[СЕРВЕР] Неверное количество!", source, 243, 151, 12 ) elseif getElementData( source, "Lang" ) == "Eng" then outputChatBox ( "[sERV] Invalid amount!", source, 243, 151, 12 ) end return end if( moneytogive < 1 ) then if getElementData( source, "Lang" ) == "Rus" then outputChatBox ( "[СЕРВЕР] Неверное количество!", source, 243, 151, 12 ) elseif getElementData( source, "Lang" ) == "Eng" then outputChatBox ( "[sERV] Invalid amount!", source, 243, 151, 12 ) end return end if( giveplayer ) then givePlayerMoney ( giveplayer, amount ) takePlayerMoney ( source, tonumber(amount) ) if getElementData( source, "Lang" ) == "Rus" then outputChatBox ( "[СЕРВЕР] Вы отправли $" ..amount.." для "..getPlayerName ( giveplayer ).. "!", source, 243, 151, 12 ) elseif getElementData( source, "Lang" ) == "Eng" then outputChatBox ( "[sERV] You have send $" ..amount.." to "..getPlayerName ( giveplayer ).. "!", source, 243, 151, 12 ) elseif getElementData( source, "Lang" ) == "Rus" then outputChatBox ( "[СЕРВЕР] "..playername.. " отправил вам $" ..amount.. "!", giveplayer, 243, 151, 12 ) elseif getElementData( source, "Lang" ) == "Eng" then outputChatBox ( "[sERV] "..playername.. " sent you $" ..amount.. "!", giveplayer, 243, 151, 12 ) end else if (giveplayer == nil) then if getElementData( source, "Lang" ) == "Rus" then outputChatBox("[СЕРВЕР] Игрок не существует.",source,243, 151, 12) elseif getElementData( source, "Lang" ) == "Eng" then outputChatBox("[sERV] Player did not exist",source,243, 151, 12) end end end end addEvent( "theMoney", true ) addEventHandler( "theMoney", getRootElement(),giveThisCash)
  17. no errors 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 )
  18. help no sending money function giveThisCash(playerNick, amount) local cash = getPlayerMoney( source ) local giveplayer = getPlayerFromName ( playerNick ) local playername = getPlayerName ( source ) local moneytogive = tonumber(amount) if( cash < moneytogive ) then if getElementData( source, "Lang" ) == "Rus" then outputChatBox ( "[СЕРВЕР] Неверное количество!", source, 243, 151, 12 ) elseif getElementData( source, "Lang" ) == "Eng" then outputChatBox ( "[sERV] Invalid amount!", source, 243, 151, 12 ) end return end if( moneytogive < 1 ) then if getElementData( source, "Lang" ) == "Rus" then outputChatBox ( "[СЕРВЕР] Неверное количество!", source, 243, 151, 12 ) elseif getElementData( source, "Lang" ) == "Eng" then outputChatBox ( "[sERV] Invalid amount!", source, 243, 151, 12 ) end return end if( givenplayer ) then givePlayerMoney ( giveplayer, amount ) takePlayerMoney ( source, tonumber(amount) ) if getElementData( source, "Lang" ) == "Rus" then outputChatBox ( "[СЕРВЕР] Вы отправли $" ..amount.." для "..getPlayerName ( givenplayer ).. "!", source, 243, 151, 12 ) elseif getElementData( source, "Lang" ) == "Eng" then outputChatBox ( "[sERV] You have send $" ..amount.." to "..getPlayerName ( givenplayer ).. "!", source, 243, 151, 12 ) elseif getElementData( source, "Lang" ) == "Rus" then outputChatBox ( "[СЕРВЕР] "..playername.. " отправил вам $" ..amount.. "!", givenplayer, 243, 151, 12 ) elseif getElementData( source, "Lang" ) == "Eng" then outputChatBox ( "[sERV] "..playername.. " sent you $" ..amount.. "!", givenplayer, 243, 151, 12 ) end else if (giveplayer == nil) then if getElementData( source, "Lang" ) == "Rus" then outputChatBox("[СЕРВЕР] Игрок не существует.",source,243, 151, 12) elseif getElementData( source, "Lang" ) == "Eng" then outputChatBox("[sERV] Player did not exist",source,243, 151, 12) end end end end addEvent( "theMoney", true ) addEventHandler( "theMoney", getRootElement(),giveThisCash)
  19. new version 2.4.5 on server 2.4.1 history version 2.2.5 to 2.4.5 Fixed the sound that survivors or zombies won repeated 2 times with 100% Fixed spawn 100% Fixed the choice of players zombie 100% added help in English at F9 100% Added panel exchange money on the F6 100% removed map zm-Chinatown Wars unnecessarily too big added to the bottom of the inscription on the server and the creators of 100% Fixed bugs with the sounds of the assumption and the definition of team added fully spawn Protect 100% Fixed a bug that is not gated money for the killing of 100% fixed all windows . Posted in 2 languages ​join as a moderator, etc. removed running corrected that there was no will when infecting.
  20. Dear users, if you want your maps were on the server let's link in pm or leave this topic. I would personally choose the good maps and put them on the server.
  21. thanks a lot dude, this script is running)
  22. Kenix

    spawn

    good idea I will try but there is still some what?
×
×
  • Create New...