Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.
GTAONLINE.PL
Tematy otagowane jako: krófkofalówka
1. Krófkofalówka
Witam mam taki kod i da?o by go przerobic pod MySql?


addEventHandler
("onPlayerJoin",getRootElement(),
function ()
bindKey(source,"u","down","chatbox","Kr?tkofal?wka")
end)
 
addEventHandler("onResourceStart",getResourceRootElement(getThisResource()),
function ()
for 
indexplayer in pairs(getElementsByType("player")) do
bindKey(player,"u","down","chatbox","Kr?tkofal?wka")
  
end
end
)
 
function 
isPlayerInRangeOfPoint(player,x,y,z,range)
   
local px,py,pz=getElementPosition(player)
   return ((
x-px)^2+(y-py)^2+(z-pz)^2)^0.5<=range
end
 
addCommandHandler
("Kr?tkofal?wka", function(plrcmd, ...)
if 
not(getElementData(plr"Praca")) then
outputChatBox
("Nie masz uprawnien aby korzysta? z kr?tkofal?wki.",plr,150,0,0)
return
end



local msg 
table.concat ( {...}, " " )
local ID getElementData(plr,"id")
        for 
k,v in ipairs(getElementsByType("player")) do
                if 
getElementData(v"Praca"then
                outputChatBox
("#6500FF(#14FF00"..ID.."#6500FF) #006E03Kr?tkofal?wka: #FFFFFF"..msg,v255255255true)
                
end
        end 
end
)