Jump to content

stefutz101

Members
  • Posts

    245
  • Joined

  • Last visited

Everything posted by stefutz101

  1. Alivetime , is saved in MTA DayZ resources . First time i think too , but i made a command to see my alivetime and it work . I want to make a script what show a mesage on global chat ( x made spawnkill on y.) if y had under 3 minutes of life . Some players stay at spawn and kill players when they spawned.
  2. addEventHandler( "onPlayerWasted", root, function( _, killer ) if killer and getElementType(killer) == "player" and killer ~= source then local alivetime = getElementData( source, "alivetime" ) or 0 local name = getPlayerName( killer ) if tonumber( alivetime ) > 3 then outputChatBox( "Playerul #ffffff"..name.."#ff0000 este suspectat de spawnkill!", root, 255, 0, 0,true ) else outputChatBox( "Playerul #ffffff"..name.."#ff0000 este suspectat de spawnkill!", root, 255, 0, 0,true ) end end end ) Noting happen , and btw : if tonumber( alivetime ) > 3 then outputChatBox( "Playerul #ffffff"..name.."#ff0000 este suspectat de spawnkill!", root, 255, 0, 0,true ) else outputChatBox( "Playerul #ffffff"..name.."#ff0000 este suspectat de spawnkill!", root, 255, 0, 0,true ) end thats wrong because if player have more than 3 minutes will show is spawnkill I can fix that but i dont under stand why dont enter in first if , i think it's wrong this script to get player name
  3. addEventHandler( "onPlayerWasted", root, function( _, killer ) local name = getPlayerName( killer ) local alivetime = getElementData( playerSource, "alivetime" ) if tonumber(alivetime) == nil then outputChatBox( "Playerul #ffffff"..getPlayerName(killer).."#ff0000 este suspectat de spawnkill!", root, 255, 0, 0,true ) elseif tonumber (alivetime) <= 3 then outputChatBox( "Playerul #ffffff"..getPlayerName(killer).."#ff0000 este suspectat de spawnkill!", root, 255, 0, 0,true ) end end ) Attempting to compare number with boolean -- 7. What i must change ? I aleready try to put ..name..
  4. I just test script nothing happer , no errors , no warnings , nothing writed in chat .
  5. Oh thancks , but i dont want the solution i just dont know why i had that warning . Btw dont work " if isObjectInACLGroup ( "user." .. nume, aclGetGroup ( "Admin" )) then" there is the problem replaced with accountName didn't work
  6. I had this problem . You want to say : when you want to mute a player in chat appear" X has ben muted by y ( x min)" but player isn't muted ? If you're answer is "yes " check the groups , i had this problem because i delleted the moderator group .
  7. No , i want a script what set player lvl to level . But i have 1 warning : expected account at argument 1 , but argument 1 is Playeraccount . Player account its writed by me when i use command . Syntax : /setlvl But thancks for that script i need that to the future scripts
  8. Hi i want to make make a script what help me to set lvl to a player addCommandHandler("setlvl", function(playerSource, cmd, thePlayeracc, amount) local nume = getAccountName ( getPlayerAccount ( playerSource )) if isObjectInACLGroup ( "user." .. nume, aclGetGroup ( "Admin" )) then if thePlayeracc then if tonumber(amount) then setAccountData(thePlayeracc, "lvl" , amount) outputChatBox("I-ai setat lvl lui ".. thePlayeracc.."la "..amount , playerSource) end end end end ) warning at setaccount data expected account at argument 1 , got string "...". how i cant get account name for a another player ?
  9. now server didnt work , please help at skype stef_stef101 ERROR : ash: ./mta-server: Permission denied
  10. Linux server , its hosted . It isn't in my pc .
  11. Hi , i need help again ! I have a mta server hosted what work on 1.4 i want to change version to 1.5 . How i can do this ? If i change version in mtaserver.conf server start in 1.5 too . 1.4.1-9.07369 1 I want to replace with 1.5.0-9.07412 1 But server start in 1.4 , when i open again mtaserver.conf , looks like first code . Help ? What i did wrong ?
  12. @ loki2143 I want to make a godmode script for admins , when they are onduty they cant get damange . Thank you , you made my work more easy Now i can do the script . Script work but it calculate the diference between blood verry but verry hard and if someone attack you with m4 you are R.I.P. i will stay at setelementdata(theplayer, "blood" , 99999999999999999999999999)
  13. All players are invincible now . I must add a "if " with test if localPlayer it's staff . TY But now it work
  14. stefutz101

    how?

    https://wiki.multitheftauto.com/wiki/CreateMarker use this
  15. Your server its hosted ? I have a hosted server , and i try to change the version to 1.5 in mta config , but when server start is 1.4 too . Search in mtaserver.conf <minclientversion>1.4.1-9.07369</minclientversion> and replace with <minclientversion>1.5.0-9.07345</minclientversion>
  16. Version 1.4.1-9.07378.0 , i try to change version to 1.5 , didn't work . Server stat in 1.4 , i try to change version in mtaserver.conf or someting like that . I will test now the script , i will edit with the results . Ty Results : the same problem : "I am invincible but if i jump from a house i take damange .
  17. Hello , yesterday i work at a script what make de admin invincible ( godmode). I dont have errors or warnings , but i can take damange . Server-side : function setInince(thePlayer) if (hasObjectPermissionTo(thePlayer, "function.banPlayer")) then if (getElementData(thePlayer, "INV") == "true") then setElementData(thePlayer,"INV", "false") outputChatBox("You are no longer Invincible", thePlayer) else setElementData(thePlayer,"INV", "true") outputChatBox("You are now Invincible", thePlayer) end else outputChatBox("You do not have permission for this", thePlayer) end end addCommandHandler("inv", setInince) Client-side function noadmdamage() if (getElementData(source, "INV") == "true") then cancelEvent() else end end addEventHandler("onClientPlayerDamage", getRootElement(), noadmdamage)
  18. TY , but how i can change server version from 1.4 to 1.5 ? https://nightly.multitheftauto.com/ver/ I try to put my server on 1.5.0-9.07345 but when server start he put back on 1.4
  19. https://nightly.multitheftauto.com/ports/?d=89.4 ... 1&mslist=1 this is the problem . I must talk with host provider no ?
  20. Server is hosted at cloud-center . Oh , yes i have another server with the same name . This is the problem ? I buy a host with 25 but its to slow and make lag at 20 or more players so i change host , and old server still runing with the same name . This is the problem ? I turned off old server , the same problem .
×
×
  • Create New...