Jump to content

WhoAmI

Members
  • Posts

    1,248
  • Joined

  • Last visited

Everything posted by WhoAmI

  1. local teamName = getTeamName(team) local xmlFile = xmlLoadFile("teams.xml") local children = xmlNodeGetChildren(xmlFile) for i,node in pairs(children) do local attribute = xmlNodeGetAttribute(node, "name") if attribute == teamName then xmlDestroyNode(node) end end
  2. Well, good idea, but is it optimal way to do this? I mean if it won't increase much usage of server.
  3. Hi. I have problem with my server, it gets sequential network troubles. I don't know what can cause such a thing. Usage of VPS doesn't exceede even 50%. I don't think that it can be problem with some script neither. What can be a problem? I also checked server's logs to see if there is any error before NT, but there isn't any error.
  4. Hello. Is there any way to call a function after 24h or after 7 days? I need it for my house system and renting house for day or 7 days. Thank you.
  5. Damn, I am so stupid. I didn't read that to run MySQL on server I have to install libmysqlclient16 module. Sorry guys for littering your database.
  6. Hello guys. I have VPS server and installed on it MTA server. OS is Debian 7. In MTA server doesn't work MySQL, I can't connect to it. MySQL base works fine, even on WWW server which is on VPS too it works. I can even connect to MySQL base not from VPS. It doesn't work only on MTA server. What can be a problem?
  7. WhoAmI

    [HELP] KILL

    Well, my bad should be onPlayerJoin event instead. But he said that he don't want to write in client so... Edited it already.
  8. WhoAmI

    [HELP] KILL

    function kill ( player ) setTimer ( setElementHealth, 5000, 1, player, 0 ) end addEventHandler ( "onPlayerJoin", root, function ( ) bindKey ( source, "enter", "down", kill ) end ) It's serverside code.
  9. WhoAmI

    [HELP] KILL

    It's impossible, check if other script doesn't disturb this code.
  10. WhoAmI

    onPlayerQuit

    When I'll get back to home I gonna check all other running resources. Thanks.
  11. WhoAmI

    onPlayerQuit

    Yea, It does. Everything works fine instead of this two. I'm pretty sure that other scripts don't change those values. I'm not amateur scripter and I'm really confused about this.
  12. WhoAmI

    onPlayerQuit

    Yea, exactly. outputDebugString ( skin .. hp ) It outputs "00", but my hp is 100 and skin isn't equal to 0.
  13. WhoAmI

    onPlayerQuit

    Hello there, I have problem I have such a code addEventHandler ( "onPlayerQuit", root, function () if getElementData ( source, "imie" ) then uid = tonumber ( getElementData ( source, "uid" ) ) local x,y,z = getElementPosition ( source ) local cash = getPlayerMoney ( source ) local skin = getElementModel ( source ) local hp = getElementHealth ( source ) outputDebugString ( skin .. hp ) dbExec ( db, "UPDATE Postacie SET portfel = '?', x = ?, y = ?, z = ?, skin = '?', hp = '?' WHERE uid = '?'", tonumber(cash), x, y, z, tonumber(skin), hp, uid ) end end) And the 'skin' and 'hp' output '0' and it saves so in database. When I spawn again I'm dead. Is it problem in my code or it is only bug of this event?
  14. query = dbQuery(connect, "SELECT * FROM Player WHERE nickname= '"..account.."'") This is wrong. With this code it's easy to do SQL inject. Use this instead query = dbQuery(connect, "SELECT * FROM Player WHERE nickname= ?", account)
  15. http://truckers.com.pl - trochę podrobiliście ten serwer z tradycją, nie uważacie? Zero innowacji. Ten nulled...
  16. addEventHandler("onClientMarkerHit", getRootElement(), pokazguisa) na addEventHandler("onClientMarkerHit", dokils, pokazguisa)
  17. WhoAmI

    Ignore

    Got problem --solved.
  18. exports.inventory:addPlayerItem ( playerElement, 3, 1 )
  19. Hello. My question is how to create command /ignore nick. Then we won't see messages from this player. I would do this by using onPlayerChat, what's your idea?
  20. WhoAmI

    executeString

    No, it isn't one line thing. It is good for some generators, where you are inserting code to the memo. For example guieditor uses it.
  21. Try outputChatBox ( data.account ) and tell us what it outputs.
  22. Podobno było dużo bugów i dużo niezgodności, które były po prostu ciężko poprawić. A co do IRC to nie mam pojęcia.
  23. WhoAmI

    target

    if ( getTeamName ( getPlayerTeam ( source ) ) == "Team Name" ) then
×
×
  • Create New...