Jump to content

FiGo

Members
  • Posts

    100
  • Joined

  • Last visited

Everything posted by FiGo

  1. I need mta memebers active to come play at my server its name is AE its cnr server
  2. FiGo

    Help

    function addNotification(accname, message) local accName = accname local account = getAccount(accname) local getaa = getAccountData(account, "unreadNotifications") if getaa then setAccountData(account, "unreadNotifications", getaa + 1) else setAccountData(account, "unreadNotifications", 1) end local date, time = getTimeDate() local final = "["..date.. " - "..time.."]" if (not fileExists("notifs/"..accName..".log")) then log[accname] = fileCreate("notifs/"..accName..".log") else log[accname] = fileOpen("notifs/"..accName..".log") end if (not log[accname]) then return end if (not fileExists("notifs/"..accName..".log")) then return end if (fileGetSize(log[accname]) == 0) then fileWrite(log[accname], final.." "..message) else fileSetPos(log[accname], 0) theLine = fileRead(log[accname], 9999999) fileWrite(log[accname], "\n"..final.." "..message) end fileClose(log[accname]) end
  3. FiGo

    Help

    setAccountData(account, "unreadNotifications", getaa + 1) else setAccountData(account, "unreadNotifications", 1)
  4. FiGo

    Help

    How could i fix bad argument [expected string at argument 1 got boolean]
  5. FiGo

    Help

    How could i fix bad argument [expected string at argument 1 got boolean]
  6. FiGo

    help me plz

    when I am trying to delete my group it keep giving me this and it don't delete The password doesn't match with the username from the groupleader! [5:04 PM] and everything is linked in the database here is the function can u help me with this -- Delete group addEvent( "onServerDeleteGroup", true ) addEventHandler( "onServerDeleteGroup", root, function ( username, password ) local accountCheck = exports.DENmysql:querySingle( "SELECT * FROM accounts WHERE username=? AND password=? LIMIT 1", username, sha256( password ) ) local groupID = exports.server:getPlayerGroupID( source ) if ( accountCheck ) and ( groupID ) or getElementData(source,"isPlayerPrime") then for k,thePlayer in ipairs(getElementsByType("player")) do if getElementData(thePlayer,"Group") == getElementData(source,"Group") then setElementData( thePlayer, "groupRank", false ) setElementData( thePlayer, "Group", false ) setElementData( thePlayer, "GroupID", false ) setElementData( thePlayer, "groupID", false ) setElementData( thePlayer, "alliance",false) setElementData(thePlayer,"aName",false) triggerClientEvent( thePlayer, "onClientFinishGroupCreate", thePlayer ) end end exports.DENmysql:exec( "DELETE FROM groups_members WHERE groupid=?", groupID ) exports.DENmysql:exec( "DELETE FROM groups_invites WHERE groupid=?", groupID ) exports.DENmysql:exec( "DELETE FROM groups WHERE groupid=?", groupID ) exports.DENmysql:exec( "DELETE FROM groups_ranks WHERE id=?", groupID) exports.DENmysql:exec( "DELETE FROM groups_membersblacklist WHERE groupid=?",groupID) exports.CPKchatsystem:outPutGroupMessageByPlayer( source, getPlayerName( source ).." deleted the group!" ) exports.DENmysql:exec("DELETE FROM groups_logs WHERE groupid=?",groupID) --remove all the logs, prevents more database memory. --[[for k, thePlayer in ipairs ( getGroupPlayers ( getElementData( source, "Group" ) ) ) do setElementData( thePlayer, "groupRank", false ) setElementData( thePlayer, "Group", false ) setElementData( thePlayer, "groupID", false ) setElementData( thePlayer, "alliance",false) setElementData(thePlayer,"aName",false) triggerClientEvent( thePlayer, "onClientFinishGroupCreate", thePlayer ) end]] if allianceGroups[groupID] then alliance_kickGroup(allianceGroups[groupID],groupID,true,source) allianceGroups[groupID] = nil end for id,allianceInfo in pairs(alliances) do alliances_removeInvite(id,groupID, true, "") end else exports.CPKdxmsg:createNewDxMessage( source, "The password doesn't match with the username from the groupleader!", 225, 0, 0 ) end end )
  7. [20-05-24 00:40:46] ERROR: CPKvip/server.luac:584: attempt to index a boolean value local theAmount = data["VIP"] local antiSpam = {} function sendPlayerVipToPlayer (player, command, amount, playername) if isTimer(antiSpam[player]) then exports.CPKdxmsg:createNewDxMessage(player,"Please wait few seconds before you transfer a vip hour.",255,0,0) return end antiSpam[player] = setTimer(function() end,2000,1) if (isElement(player) and (exports.server:isPlayerLoggedIn(player))) then if (not tonumber(amount) or amount == nil or playername == nil or amount:match("^%s*$") or playername:match("^%s*$")) then exports.CPKdxmsg:createNewDxMessage(player,"Syntax: /sendviphours <hours> <player name>",255,0,0) return end local amt = round(math.abs(amount)) local id = exports.server:getPlayerAccountID(player) local data = exports.CPKmysql:querySingle("SELECT VIP FROM accounts WHERE id=?",id) local theAmount = data["VIP"] if (tonumber(theAmount) >= 120) then if (convertTime(tonumber(theAmount)) == amt) then exports.CPKdxmsg:createNewDxMessage(player,"You cannot transfer the same amount.",255,0,0) return elseif (convertTime(tonumber(theAmount)) >= amt) then if (getPlayerFromPartialName(playername) == player) then exports.CPKdxmsg:createNewDxMessage(player,"You cannot transfer the VIP to your self.",255,0,0) return end if (getPlayerFromPartialName(playername)) then local transplayer = getPlayerFromPartialName(playername) decreasePlayerVIP(player, amt*60) givePlayerVIP(transplayer, amt*60) exports.CPKdxmsg:createNewDxMessage(player,"Your "..amt.."H of VIP has been transfered to "..getPlayerName(transplayer)..".",0,255,0) exports.CPKdxmsg:createNewDxMessage(transplayer,"You received "..amt.."H of VIP from "..getPlayerName(player)..".",0,255,0) else exports.CPKdxmsg:createNewDxMessage(player,"Player not found. Please make sure the name of the player is correct.",255,0,0) end else exports.CPKdxmsg:createNewDxMessage(player,"You don't have enough VIP hours.",255,0,0) end else exports.CPKdxmsg:createNewDxMessage(player,"You must have at least 2 hours of VIP.",255,0,0) end end end addCommandHandler("sendviphours", sendPlayerVipToPlayer) [20-05-29 03:26:33] ERROR: CPKvip/server.luac:10: attempt to compare nil with number elseif ( userData.VIP < 60 ) then -- Open VIP Panel function openVIPPanel ( playerSource, commandName ) local thePlayer = playerSource if ( exports.server:getPlayerAccountID( thePlayer ) ) then local userData = exports.CPKmysql:querySingle( "SELECT * FROM accounts WHERE id=? LIMIT 1", exports.server:getPlayerAccountID( thePlayer ) ) if ( userData ) then if ( userData.VIP == 0 ) then exports.CPKdxmsg:createNewDxMessage( thePlayer, "You are not a VIP member! Check the forum for more information!", 225, 0, 0 ) --triggerClientEvent(thePlayer,"updatesPremHours",thePlayer,math.floor( userData.VIP / 60 )) elseif ( userData.VIP < 60 ) then exports.CPKdxmsg:createNewDxMessage( thePlayer, "VIP time remaining: " .. userData.VIP .. " minutes", 0, 225, 0 ) --triggerClientEvent(thePlayer,"updatesPremHours",thePlayer,userData.VIP,"minutes") triggerClientEvent ( thePlayer, "openVIP", thePlayer, math.floor(userData.VIP/60)) else if ( math.floor( userData.VIP / 60 ) == 1 ) then exports.CPKdxmsg:createNewDxMessage( thePlayer, "VIP time remaining: 1 hour", 0, 225, 0) --triggerClientEvent(thePlayer,"updatesPremHours",thePlayer,1,"hour") triggerClientEvent ( thePlayer, "openVIP", thePlayer, 1) else exports.CPKdxmsg:createNewDxMessage( thePlayer, "VIP time remaining: " .. math.floor( userData.VIP / 60 ) .. " hours", 0, 225, 0) triggerClientEvent ( thePlayer, "openVIP", thePlayer, math.floor(userData.VIP/60)) end end end end end addCommandHandler ( "vip", openVIPPanel ) addEvent("openVIPPanel", true) addEventHandler("openVIPPanel", root, openVIPPanel)
  8. FiGo

    help me

    addCommandHandler("criminal", function (player) exports.GTIhud:dm("This command has been disabled, you must commit a crime to join in Criminals team", player, 255, 0, 0) end ) function isCriminal(player) if (exports.GTIteams:isPlayerInTeam(player, "Criminals")) then return false end if (exports.GTIbusiness:setPlayerCriminal(player) ~= "Criminal") then return false end return true end what is wrong in that function why when I commit a crime it doesn't move me to the criminal team
  9. FiGo

    Server names

    If i want to make a server with a name that is already made can i make it with my scripts Plz anyone answer Why does none answers me
  10. Where should i report server
  11. FiGo

    help plz

    still did not work + when I hit the car the car get fixes but while I am standing it doesn't increase alone
  12. FiGo

    help plz

    i added it but it donot work I need to make when the car got damaged it increases by +5 I mean if it is 90 it be 95 and like that until it becomes 100
  13. FiGo

    help plz

    I changed it and it doesn't work function fix() CarHP = getElementHealth(source) if ( getElementModel(source) == 451 ) then if ( CarHP < 90 ) then setElementHealth ( source, 100 ) end end end addEventHandler("onClientVehicleDamage", root, fix) help plz
  14. FiGo

    help plz

    CarModel = getElementModel ( 516 ) If ( CarModel = 516 ) then CarHP = getElementHealth( 516 ) if ( CarHP < 90 ) then setElementHealth ( 516, CarHP + 5 ) why this function for car health increase when it get damaged why it doesn't work
  15. I need to make a server but when the player login it asks him do you want to join freeroam mod or rpg mod
  16. Hello I am having a line bugged can anyone fix it for me it is cityzones. exec("INSERT INTO zones (id, name, owner, ctrl, price, objects, radio, x, y, sx, sy) VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", id, name, owner, ctrl, price, objects, radio, x, y, sx, sy)
  17. FiGo

    CIP Server

    Hello admins i have a problem that someone made my server with my scripts and it is name CIP and it was my server and i closed it so they opened it again with my resources i already forgot to tell you there names there names is be!t and lucifer
  18. Look i cannot understand anything in it i need someone to teach me
  19. I need an mta developer and trusted person to learn me how to be good developer
  20. FiGo

    Help me

    and then It donot rename I want to rename regina advanced hummer but it donot work
  21. FiGo

    Help me

    can anyone answer
  22. FiGo

    Help

    Can you write for me the function
  23. FiGo

    Help

    But how to make when a player press t and write anything it appear with country
×
×
  • Create New...