Jump to content

The_Ex

Members
  • Posts

    66
  • Joined

  • Last visited

Everything posted by The_Ex

  1. I'm the one who did the original translation to Latvian. I can honestly say some of the translations are suboptimal. I'm not really around anymore but I'm willing to fix my mistakes. So where do I get translation files?
  2. Didn't MTA set a new unique player record yesterday? Or the monitor was somehow lying?
  3. addEventHandler("onClientRender",getRootElement(), function() local px,py,pz,tx,ty,tz,dist px,py,pz = getCameraMatrix() for k,v in ipairs(getElementsByType("player")) do tx,ty,tz = getElementPosition(v) dist = math.sqrt((px-tx)^2 + (py-ty)^2 + (pz-tz)^2) if dist < 30.0 then if isLineOfSightClear(px,py,pz,tx,ty,tz,true,false,false,true,false,false,getLocalPlayer()) then local sx,sy,sz = getPedBonePosition(v,5) local x,y = getScreenFromWorldPosition(sx,sy,sz+0.3) if x then dxDrawText(getPlayerName(v),x,y,x,y,tocolor(150,50,0),0.85+(15-dist)*0.02,"bankgothic") end end end end end ) This is random example, should work.
  4. Basically you will have to do something like this on every frame 1)getCameraMatrix 2) for loop through players 2.1)getElementPosition 2.2)isLineOfSightClear 3.1)getPedBonePosition 3.2)getScreenFromWorldPosition 3.3)dxDrawText
  5. The_Ex

    zole's maps

    Tested some of your latest maps. They're pretty good. Also I like that you're making maps that takes around two minutes to complete.
  6. You output message to player NOT his name. function lock_unlockDoor( player ) local veh = getPedOccupiedVehicle( player ) local lock = isVehicleLocked( veh ) if veh and lock == false then setVehicleLocked( veh, true ) outputChatBox("Car locked",player,255,255,0,255) elseif veh and lock == true then setVehicleLocked( veh, false ) outputChatBox("Car unlocked",player,255,255,0,255) end end
  7. Online stream support will be included in MTA 1.1(however, that won't be replacing existing radio stations), but for now, there's no such thing.
  8. Why bother using that playerState variable? if mysql_num_rows(query)== 1 then triggerEvent("spawnTheCharacter", getRootElement(), theUser) outputDebugString ("the data is loaded") else triggerClientEvent("move1", getRootElement()) outputDebugString ("move to create a char") end
  9. Ok, i tested the code i wrote and it IS working, probably you're just typing it like /pay amount playername not /pay playername amount. But i had one mistake, which wasn't related to outputting "there is not such player".
  10. You really should spend some time to learn Lua scripting... You have too much mistakes and unused code. function pay(source , cmd, thePlayer, amount) toWho = getPlayerFromName ( thePlayer ) if toWho then amount = tonumber(amount) or 0 if amount > 0 and getPlayerMoney(source) >= amount then givePlayerMoney(toWho,amount) takePlayerMoney(source,amount) outputChatBox("You've given " ..thePlayer .. " $" .. amount .. "." ,source,255,255,150) outputChatBox(getPlayerName(source) .. " has given you $" .. amount .. "!",toWho,255,255,245) else outputChatBox("Amount have to be greater than 0 or you don't have that much cash!",source,255,0,0) end else outputChatBox( "There is no such player online!", source ) end end addCommandHandler("pay", pay) This should work but you have to try to understand the code.
  11. amount = tonumber(amount) -- convert amount to number givePlayerMoney(toWho,amount) takePlayerMoney(source,amount) and outputChatBox(name .. " has given you $" .. amount .. "!",toWho,255,255,245)
  12. Shouldn't it be if mysql_num_rows(query)== 1 then ?
  13. http://lua-users.org/wiki/TablesTutorial Hope this help.
  14. isObjectInACLGroup("user.". .name, aclGetGroup ("Admin")) This isn't really for admins, if you change your nickname, it just won't work. Better use https://wiki.multitheftauto.com/wiki/Has ... rmissionTo and check for function which is only available to admins like ban or make your own ACL list.
  15. The_Ex

    MYSQL Problem

    mysql_query ( database, "INSERT INTO playername VALUES ('"..playername.."')") Should be something like that if i got you right... Just learn SQL, you wouldn't have those questions if you had spent some time to learn SQL statements.
  16. Try setting camera target before setting position and rotation. If it works but looks some kinda wierd you have to use timer or some kind of setCameraMatrix/setCameraTarget combination.
  17. On VPS you might run into CPU bottleneck pretty fast so keeping stuff on RAM for fast access is better. Actually, i would prefer that for most cases because stats are not "not-needed-at-all" because they are regularly updated, but you should load stats for online players only and use queries for offline user stats if needed. That way you won't keep too much on RAM and also speed things up a bit. However, server failure might occur so you have to auto-save stats like every 5-10mins.
  18. I have the same problem, it really gets annoying. Sometimes it freezes after spawn, sometimes when you pick up weapon pickup or just randomly pops up. This started after upgrading to 1.0.4 server. Still can't find proper solution to prevent all of those network troubles.
  19. The_Ex

    Money Script

    That's ridiculous that you're asking for that kinda commands and own server(which you are planning to open for public).
  20. Sqlitebrowser can execute SQL queries and you should use default values for fields.
  21. The_Ex

    Image

    I believe he is asking about textures.
  22. The_Ex

    car dmg [re]

    Your code sets damageProof once (when you start the resource). So you have to use setVehicleDamageProof every time you spawn a new vehicle.
  23. If you don't know how to script and are not willing to learn, just go away... Start here: http://robhol.net/guide/basics/ and here: https://wiki.multitheftauto.com/wiki/Scr ... troduction
  24. Looks like guiSetEnabled(button,false) but those are stupid questions and nothing has changed.
×
×
  • Create New...