Jump to content

The_Ex

Members
  • Posts

    66
  • Joined

  • Last visited

Details

  • Location
    Jekabpils/Riga, Latvia

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

The_Ex's Achievements

Snitch

Snitch (10/54)

0

Reputation

  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.
×
×
  • Create New...