Jump to content

Walid

Members
  • Posts

    1,491
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by Walid

  1. Walid

    Billboard Pics

    Wrong , he don't need to use this engineLoadDFF() engineReplaceModel() He is talking about the billboard texture (TXD).
  2. Walid

    Billboard Pics

    Use shaders or replace the TXD.
  3. 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)
  4. use your position X , Y then type /showcol 1 to check if the colShape is in the right place or not.
  5. Walid

    Help please

    lol what are you waiting for post warnings here.
  6. 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)
  7. wrong you don't need to use giveWeapon simply you can use setPedWeaponSlot()
  8. as i can see it's already add the problem in the meta.xml.
  9. are you serious "getLocalPlayer()" server side replace "getLocalPlayer()" with source here
  10. Walid

    [WIP] Mask Shop

    No don't stop the project you can do it, btw in my code i can use masks with all skins. anyways good luck
  11. Walid

    [WIP] Mask Shop

    I already create sth like that in my server a long time ago : Pictures :
  12. You should close your PHP Code Tags every time ?>
  13. Walid

    PM system

    there is many thig wrong in your code. sorry i don't have time to fix them all
  14. Walid

    Basic's SQL

    You are welcome
  15. خطأ 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.
  16. Walid

    Basic's SQL

    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
  17. Walid

    Basic's SQL

    check this and tell me what's wrong here
  18. Walid

    PM system

    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)
  19. Walid

    PM system

    simply you need to use "guiGridListClear()" before you add player names inside the gridlist.
  20. Walid

    Basic's SQL

    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)
  21. Walid

    PM system

    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 )
  22. Walid

    PM system

    Many things wrong in your code pmer it's not defined here
  23. Walid

    PM system

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