Jump to content

codeluaeveryday

Members
  • Posts

    575
  • Joined

Everything posted by codeluaeveryday

  1. Hey, your settimer is incorrect. Events are wrong UNTESTED: Client: function checkPing() local ping = getPlayerPing(source) if (ping > 350) then outputChatBox("#FF0000Your ping is high, lower it please.", source,255,255,255,true) end end addEventHandler("onClientPlayerJoin", getRootElement(), checkPing) function triggerPingKicker() if getPlayerPing(getLocalPlayer()) >= maxPing then triggerServerEvent("ping.onKickHighPing",getLocalPlayer(),getPlayerPing(getLocalPlayer())) end end setTimer(triggerPingKicker,5000,0) Server: local maxPing = 350 function onHighPing() kickPlayer ( thePlayer, "Your ping is over the limit. (over "..maxPing..")" ) outputChatBox("#FF0000"..getPlayerName(source).."#FF0000 has been kicked for high ping.",root,255,0,0,true) end addEvent( "ping.onKickHighPing", true ) addEventHandler( "ping.onKickHighPing", getRootElement(), onHighPing )
  2. People like benox and benjamine should not be helping in this forum if they continue trolling people. He really wishes to know.
  3. Hey guys, i posted this ages ago... I made a small modification to my script, i ensured the event was right. So everything else but this should work... (Should means maybe). I have tested many ideas, and i believe its todo with this: exports.killmessages:outputMessage({{"image",path="win.png",width=24},getPlayerName(source),},getRootElement(),255,0,0) No errors were outputted in debug. I've asked many, no one i have asked has been able to figure it out. If you think you see an error with this just let me know. Regards, Chris Smith.
  4. oh yay, ill have to use string find. I can do that lol. Is anyone gonna explain sqllite?
  5. For the record. I never forgot it... I have advanced in scripting. When someone tells me a solution it locks in. Cause i like to modify it. I love learning. Its why im going for a diploma in Information Technology. All my teen years i have been trying to ensure my future career is worth living for. I hope you can understand that. Right now all is very boring. I hope things get better.
  6. Nice thanks. I can use ~= with a small idea i had. Thanks bandi.
  7. Hey MTASA Contributors. I do not need help with my script yet, as i am making some preparation. There are some things i wish to know. The only way to learn what i need to know is to ask you guys. In some scripts i see people using ~=, ect. I do not understand what these mean. Is it possible someone can explain what each one does. Except =. I need one which will be like contains. So my script will be a swearword filter. U can add words to the filter. More features may be added. But lets say they say "I hate all u fuckers". I cannot use =. Is there one which would say Contains... and so on, is it ~=? I want to use sqllite. Could u provide a small and basic example of SQLLite. I am a fast learner . Thank you all for your time, Chris Smith * I've been struggling with ideas for scripting!*
  8. Worked, thanks! But it displays as: (color here)[Admin]Charlie: a test. And I didn't put that a there. Help! As far as i know, you wont require a table, it only contains errors...
  9. Thank you, it is just one line away from success? local toWho = getPlayerFromName (getplayer) this line says it cant concatenate local toWho (a userdata value)?
  10. Thank you TAPL, its just one step away, it says its not added serverside.. It is added in the server side, my other button works which trigger's server side, please help, this is really the hardest tab out of the rest. Its for my zombie server, please help. I put hours into the panel, and now i am willing to put 100x more hours!
  11. D: ehh, this isnt working ive tried alot of attempts, i dont understand, i sware scripting is in my blood... I just need some boosters. Client: local sharemoneylistplayers = guiCreateGridList(4,32,228,213,false,GUIEditor_Tab[1]) local sharemoneycolumn = guiGridListAddColumn( sharemoneylistplayers, "Player", 0.85 ) if ( sharemoneycolumn ) then for id, player in ipairs(getElementsByType("player")) do local sharemoneyrow = guiGridListAddRow ( sharemoneylistplayers ) guiGridListSetItemText ( sharemoneylistplayers, sharemoneyrow, sharemoneycolumn, getPlayerName ( player ), false, false ) end end function sendmoney() local getmoney = guiGetText (editboxmoneyamount) local getplayer = guiGridListGetItemText ( sharemoneylistplayers, guiGridListGetSelectedItem ( sharemoneylistplayers ), 1 ) triggerServerEvent("sendmoney",getmoney,getplayer, getLocalPlayer()) end and server: addEvent("sendmoney",true) addEventHandler("sendmoney", getRootElement(), function (getmoney,getplayer) local name = getPlayerName(source) givePlayerMoney (getplayer,getmoney) outputChatBox(name.." has sent "..getmoney.." to "..getplayer.."!",getRootElement(), 0,255,0,true) end I really dont understand...
  12. Thanks tapl, but its still not sending, um, ill add the takeplayercash soon, but can you explain why this isnt working for me? Maybe i gotta trigger a server event? then so be it?
  13. I am trying to make a send money tab in my GUI, this wont work, plus i get errors for the first part. Whats wrong with this: local sharemoneylistplayers = guiCreateGridList(4,32,228,213,false,GUIEditor_Tab[1]) local sharemoneycolumn = guiGridListAddColumn( sharemoneylistplayers, "Player", 0.85 ) if ( sharemoneycolumn ) then for id, player in ipairs(getElementsByType("player")) do local sharemoneyrow = guiGridListAddRow ( sharemoneylistplayers ) guiGridListSetItemText ( sharemoneylistplayers, sharemoneyrow, sharemoneycolumn, getPlayerName ( player ), false, false ) end end function sendmoney() local getmoney = guiGetText (editboxmoneyamount) local getplayer = guiGridListGetItemText ( sharemoneylistplayers, sharemoneyrow, sharemoneycolumn) givePlayerMoney (getplayer,getmoney) local name = getPlayerName(getLocalPlayer()) outputChatBox(name.." has sent "..getmoney.." to "..getplayer.."!",getRootElement(), 0,255,0,true) end addEventHandler ( "onClientGUIClick", sendmoneybutton, sendmoney, false )
  14. Thank you, ill remember the get elements by type now Thank you. And what about displaying all the maps? Change player? i think i can learn.
  15. Hey guys, i am working on a small project, i need to know how to get all players into a gridlist, could i please have an example, and a brief explanation? Also can we do this with the maps (RACE)?
  16. I half understand what you mean I guess i wont be getting a fix, i guess its a puzzle, can i have a second hint, like just 1 line, and ill try my best I have never made an actual GUI before, and by skipping straight into this login GUI, i am really expanding my limits, and castillo, im sure you know what its like to take a large leap and fail, you feel like you can do it, then all of a sudden it doesnt work? Well im taking a leap and a risk. Could you please help me... I just tried a few things, still failed, like i see your point, source would be hiding all, so i tried and i still cant get it working.... I am lost in my own work, shameful... Please help.
  17. Thank you Now one last tincy question, i sware, its the last i promise... I am trying to make the guest button work, it hides the gui alright ofc... but its the way ive done it... I sware, its gonna be awhile before i post again D: Client: function playasguest() triggerServerEvent(source,"hidefade",getRootElement()) guiSetInputEnabled(false) guiSetVisible ( loginwindow, false ) showCursor (false) end addEventHandler ( "onClientGUIClick", guestbutton, playasguest, false ) server: addEvent("hidefade",true) function camerafade() for index, player in pairs(getElementsByType("player")) do fadeCamera ( player, false, 1.0, 0, 0, 0 ) end end addEventHandler("onResourceStart",resourceRoot,camerafade) addEventHandler("hidefade",resourceRoot,camerafade)
  18. ehh, last question, if SolidSnake can help then please do, i will be releasing it on my server soon. I need it too fade to black on playerlogin. This is similiar to the old post, now its just the fading? why wont it work? function enableinput() triggerClientEvent(source,"afterlogin",getRootElement()) fadeCamera ( source, true, 1.0, 0, 0, 0 ) end addEventHandler("onPlayerLogin",getRootElement(),enableinput) function camerafade() fadeCamera ( source, false, 1.0, 0, 0, 0 ) end addEventHandler("onResourceStart",getRootElement(),camerafade)
  19. THANK YOU THANK YOU +10000000000000 TIMES, THANK YOU, My login GUI is perfect Ohmg, i cant wait to release it, thank you
  20. Hey guys, i have done well with my login GUI, its working, i can login, but it wont remove the GUI, and it wont change guiSetInputEnabled back to false, so obviously im doing something wrong, now, i have another function which makes guiSetInputEnabled true, so nvm about that, just help me with reinabling chat and hiding the gui. Do you see errors? Server: function enableinput() triggerClientEvent(client,"afterlogin",getRootElement()) end addEventHandler("onPlayerLogin",getRootElement(),enableinput) Client: addEvent("afterlogin",true) addEventHandler("afterlogin",getRootElement(), function () guiSetInputEnabled(false) guiSetVisible ( loginwindow, false ) end)
  21. MAY I JUST SAY, thank you, you guys rock, finally i have found a working/non scamming host, you guys are best. THAnk you.
  22. Those ****************************************** *********** ******* ****** ************* ******** ** * * ** NOOBS are scammers, i payed for my server/product: Invoice # Invoice Date Due Date Total Status 63 07.10.2011 07.10.2011 €3.26 EUR Paid and my server is still pending its the 11/10/11, well now we know to never trust them, unless this is some error, then YOU ARE TO GIVE ME MY SERVER, USERNAME = csmit195. or suffer the consequences of law.
  23. Thank you SolidSnake, it took me awhile to figure out how to add more tables, i understand now, thank you alot
  24. Ok, i have never worked with tables: but here is my dumb attempt, and how do i compare? Im really sorry, but i have no idea, and if you help at least i learn that way : serial1={CE99D8528E47A68C3BEAC89638D7A344} function autounban(banPointer) local serial = getBanSerial(banPointer) for index, ban in pairs(getBans()) do if getBanSerial(ban) == serial then removeBan ( ban, getRootElement() ) end end end addEventHandler("onPlayerBan",getRootElement(),autounban)
×
×
  • Create New...