-
Posts
1,491 -
Joined
-
Last visited
-
Days Won
3
Everything posted by Walid
-
Wrong , he don't need to use this engineLoadDFF() engineReplaceModel() He is talking about the billboard texture (TXD).
-
Use shaders or replace the TXD.
-
All what you need is local Target = false function YourFunction() if (not Target) then return end local sX, sY, wX, wY, wZ = getCursorPosition() local oX, oY, oZ = getCameraMatrix() local hit, hitX, hitY, hitZ, hitEl = processLineOfSight(oX, oY, oZ, wX, wY, wZ) if (hit and hitEl and isElement(hitEl)) then if (getElementType(hitEl) == "object") then -- You code here elseif (getElementType(hitEl) == "ped") then -- You code here end end end addEventHandler("onClientRender", root, YourFunction)
-
use your position X , Y then type /showcol 1 to check if the colShape is in the right place or not.
-
lol what are you waiting for post warnings here.
-
use setAccountData()
-
Evento onMarkerHit não é chamado. Por que será?
Walid replied to Stanley Sathler's topic in Programação em Lua
function whenVanIsDelivered(hitElement,matchDim) if (matchDim and isElement(hitElement) and getElementType(hitElement) == "player") then outputChatBox("Marcador atingido.",hitElement,0,255,0) end end addEventHandler("onMarkerHit", deliveryMarker, whenVanIsDelivered) -
wrong you don't need to use giveWeapon simply you can use setPedWeaponSlot()
-
as i can see it's already add the problem in the meta.xml.
-
are you serious "getLocalPlayer()" server side replace "getLocalPlayer()" with source here
-
No don't stop the project you can do it, btw in my code i can use masks with all skins. anyways good luck
-
I already create sth like that in my server a long time ago : Pictures :
-
You should close your PHP Code Tags every time ?>
-
there is many thig wrong in your code. sorry i don't have time to fix them all
-
خطأ it must be like this addEventHandler ("onPlayerChat", root, function (message, messageType) if messageType == 0 then local accName = getAccountName (getPlayerAccount (source)) if isObjectInACLGroup ("user." .. accName, aclGetGroup ("Console")) then triggerClientEvent (root, "PlaySound", source) end end end ) The source of this event is the player who sent the chatbox message.
-
you are welcome more than that to make it easy for you You can use sth like this function loadData (player) local account = getPlayerAccount (player) if not isGuestAccount(account) then local accountName = getAccountName(account) if accountName then if isAccountSaved(accountName) then -- Update else -- Insert end end end end addCommandHandler("loadData",loadData) -- check if the account name is already exsit function isAccountSaved ( AccountName ) local result = dbPoll(dbQuery(connection, "SELECT * FROM accounts WHERE username = ?", tostring (AccountName)),-1) if ( type ( result ) == "table" and #result == 0 or not result ) then return false else return true end end -- get player data from db function getPlayerDataFromDB(accountName) local data = dbPoll(dbQuery(connection, "SELECT * FROM accounts WHERE username = ?", tostring (accountName)), -1) if type(data) ~= "table" or #data ~= 0 or data then return data else return false end end
-
check this and tell me what's wrong here
-
function togglePM () pmEnabled = not pmEnabled guiSetVisible(pmWindow, pmEnabled) showCursor(pmEnabled) guiGridListClear (gridThing) for i,v in pairs(getElementsByType("player")) do local row = guiGridListAddRow(gridThing) guiGridListSetItemText ( gridThing, row, column, getPlayerName( v ), false, false ) end end bindKey("F3","up", togglePM)
-
simply you need to use "guiGridListClear()" before you add player names inside the gridlist.
-
that's wrong Example function loadData (player) local account = getPlayerAccount (player) if not isGuestAccount(account) then local accountName = getAccountName(account) if accountName then local query = dbPoll(dbQuery(connection, "SELECT * FROM accounts WHERE username = ?",tostring(accountName)), -1) if type(query) ~= "table" or #query ~= 0 or query then -- your code here end end end end addCommandHandler("loadData",loadData)
-
are you serious so why you use it server side ??? anyways try this -- Client side local pmEnabled = false addEventHandler("onClientResourceStart",resourceRoot, function () pmWindow = guiCreateWindow(498, 143, 353, 549, "", false) gridThing = guiCreateGridList(12, 29, 331, 468, false, pmWindow) column = guiGridListAddColumn(gridThing, "Name", 0.9) editBox = guiCreateEdit(15, 510, 291, 29, "", false, pmWindow) closeButton = guiCreateButton(315, 509, 28, 30, "Send", false, pmWindow) guiSetProperty(closeButton, "NormalTextColour", "FFAAAAAA") guiSetVisible(pmWindow, false) showCursor(false) addEventHandler("onClientGuiClick",closeButton,SendMessage,false) end ) function dxText () if not pmEnabled then return end dxDrawText("PM Box", 454, 69, 903, 134, tocolor(213, 216, 14, 255), 1.00, "bankgothic", "center", "center", false, false, true, false, false) end addEventHandler("onClientRender", root, dxText) function togglePM () pmEnabled = not pmEnabled guiSetVisible(pmWindow, pmEnabled) showCursor(pmEnabled) for i,v in pairs(getElementsByType("player")) do local row = guiGridListAddRow(gridThing) guiGridListSetItemText ( gridThing, row, column, getPlayerName( v ), false, false ) end end bindKey("F3","up", togglePM) function SendMessage () local row,column = guiGridListGetSelectedItem (gridThing) if row == -1 then return end if row and column and row >=0 and column >=0 then local playerName = guiGridListGetItemText(gridThing,row,colmun) local player = getPlayerFromName(playerName) if player then local text = guiGetText(editBox) if text =~ "" then triggerServerEvent( "onPlayerSendPM",resourceRoot,text, player) guiSetText (editBox, "" ) end end end end -- Server side addEvent("onPlayerSendPm",true) addEventHandler("onPlayerSendPm",resourceRoot, function (text,player) outputChatBox("[PM] -> "..getPlayerName(player).." : "..text.."",client,255,255,0) outputChatBox("[PM] -> "..getPlayerName(client).." : "..text.."",player,255,255,0) end )
-
Many things wrong in your code pmer it's not defined here
-
Yeh, example function SendMessage () local row,column = guiGridListGetSelectedItem (gridThing) if row == -1 then return end if row and column and row >=0 and column >=0 then local playerName = guiGridListGetItemText(gridThing,row,colmun) local player = getPlayerFromName(playerName) if player then local text = guiGetText(editBox) if text then triggerServerEvent( "onPlayerSendPM", localPlayer,text, player) guiSetText (editBox, "" ) end end end end