Jump to content

Kenix

Retired Staff
  • Posts

    4,121
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by Kenix

  1. Agree, if he/she releases this, then it'll become like MTA paradise, Valhalla Gaming scripts, everyone using them and no unique servers. Yes i mean it.
  2. Ninguem[ATZ], Learn LUA! viewtopic.php?f=148&t=40809
  3. Kenix

    Medic Change

    What the problem find id here? https://wiki.multitheftauto.com/wiki/Weapons Also use [xml][/xml] tags!
  4. It should work i think you use it on server side. Show meta.xml Also use [xml][/xml] tags.
  5. Kenix

    need help.

    sckatchof, You need check if you select player in gridlist and trigger to server ( triggerServerEvent ). In server side you need get ip,serial,.. ( what you need ) and send to client with triggerClientEvent and set text to label.
  6. Kenix

    need help.

    Draken,getPlayerIP is server side
  7. Kenix

    Not Working

    Function print disabled in mta. Also getPlayerTeam ( player ) == 'Team 1' it's wrong because getPlayerTeam return team element ( not string ). So correct addEventHandler ( 'onMarkerHit', root, function ( uElement ) if source == myMarker and getElementType( uElement ) == 'player' then local uTeam = getPlayerTeam ( uElement ) if uTeam and getTeamName( uTeam ) == 'Team 1' and getElementModel ( uElement ) == 0 then outputChatBox 'TODO' end end end )
  8. Никто не будет писать за вас весь скрипт. Вам нужно самому научиться. Я кидал в последнем посте ссылку. Вперёд.
  9. 1.Пока нет. 2.Можно через функцию removeWorldModel 3.https://community.multitheftauto.com/index.php?p= ... ls&id=2513 4.https://wiki.multitheftauto.com/wiki/Cli ... _functions http://development.mtasa.com/index.php? ... troduction viewtopic.php?f=141&t=32458 Покажи скрипт с заменой оружия. Ну и попробуй заменить на другое.
  10. http://dev.mysql.com/doc/refman/5.5/en/index.html
  11. Kenix

    open window

    'win' variable defined?
  12. Kenix

    Not Working

    Not understand you.
  13. Kenix

    Not Working

    getPlayerTeam getElementModel ?
  14. Kenix

    Not Working

    You need to learn to fix everything themselves.
  15. Kenix

    Car color

    Good idea copy paste all code. Good luck.
  16. No problem. If in doubt, check.
  17. Kenix

    Car color

    You have syntax errors. Learn lua. viewtopic.php?f=148&t=40809 Or it's part code command handler function?
  18. function fUpdatePlayerStats ( _, uAttacker, _, nBodypart ) if ( not uAttacker or uAttacker == source ) then return end local uAccount = getPlayerAccount ( uAttacker ) if ( uAccount and not isGuestAccount ( uAccount ) ) then local nKills = tonumber ( getAccountData ( uAccount, "kills" ) ) or 0 local nHeadshots = tonumber ( getAccountData ( uAccount, "headshots" ) ) or 0 setAccountData ( uAccount, "kills", nKills + 1 ) if ( nBodypart == 9 ) then setAccountData ( uAccount, "headshots", nHeadshots + 1 ) end end local uAccountSource = getPlayerAccount ( source ) if ( uAccountSource and not isGuestAccount ( uAccountSource ) ) then local nDeaths = tonumber ( getAccountData ( uAccountSource, "deaths" ) ) or 0 setAccountData ( uAccountSource, "deaths", nDeaths + 1 ) end end function fGetPlayerStats ( uPlayer ) local uAccount = getPlayerAccount ( uPlayer ) if ( uAccount and not isGuestAccount ( uAccount ) ) then local nKills = getAccountData ( uAccount, "kills" ) or 0 local nHeadshots = getAccountData ( uAccount, "headshots" ) or 0 local nDeaths = getAccountData ( uAccount, "deaths" ) or 0 local nRatio = math.max( 0, math.min( 100, math.floor( nKills / ( nDeaths + nKills ) * 100 ) ) ) outputChatBox ( "[sTATS]".. getPlayerName ( uPlayer ) .."'s Stats: Kills: ".. tostring ( nKills ) .." (".. tostring ( nHeadshots ) .." Headshots), ".. tostring ( deaths ) .." Deaths, Ratio: ".. tostring ( nRatio ), root, 50, 255, 0 ) end end addEventHandler ( "onPlayerWasted", root, fUpdatePlayerStats ) addCommandHandler ( "stats", fGetPlayerStats ) addCommandHandler ( "st", fGetPlayerStats ) Updated. SolidSnake14,Your code have syntax errors and ratio calculation wrong too.
×
×
  • Create New...