Jump to content

Kenix

Retired Staff
  • Posts

    4,121
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by Kenix

  1. Kenix

    SQL Table

    You use ( dynamic data or static ) for get id? Dynamic is tables/element data/... Static is mysql/sql db,xml,..
  2. Kenix

    SQL Table

    It's check if owner ( or if not valid owner ) not have any vehicles. If not valid owner then its condition passed.
  3. Kenix

    SQL Table

    local tRequest = executeSQLQuery ( " SELECT * FROM vehicles WHERE owner = 'Kenix' AND id = '" .. idCode .. "'" ) if not tRequest or #tRequest == 0 then -- If owner with id not have any vehicles. -- TODO else -- If Have. -- TODO end
  4. Kenix

    SQL Table

    You need check if owner have vehicles?
  5. Kenix

    SQL Table

    Not understand you.
  6. Kenix

    SQL Table

    It's correct -- Your code if not executeSQLQuery ( " SELECT * FROM vehicles WHERE owner = 'Kenix' AND id = '" .. idCode .. "'" ) then -- Buy the vehicle and assign the ID else -- Put your code here to generate new id then check again if id exists already end Draken, You can use [[ ]] only if you have string ONLY. Not If you have concats or something. Ex print [[ Hello \n all! ]] --> Hello \n all!
  7. Kenix

    alc Group Show

    exports [ 'scoreboard' ]:addScoreboardColumn ( 'Group' ) addEventHandler ( 'onPlayerLogin', root, function ( _, uAccount ) local sGroup = 'None' local sAccount = getAccountName ( uAccount ) if isObjectInACLGroup ( 'user.' .. sAccount, aclGetGroup ( 'Admin' ) ) then sGroup = 'Admin' elseif isObjectInACLGroup ( 'user.' .. sAccount, aclGetGroup ( 'Console' ) ) then sGroup = 'Console' elseif isObjectInACLGroup ( 'user.' .. sAccount, aclGetGroup ( 'SuperModerator' ) ) then sGroup = 'Super Moderator' elseif isObjectInACLGroup ( 'user.' .. sAccount, aclGetGroup ( 'Moderator' ) ) then sGroup = 'Moderator' end setElementData ( source, 'Group', sGroup ) end )
  8. https://wiki.multitheftauto.com/wiki/Scr ... troduction
  9. function draw () list = Numbers[1].." "..Places[1].."/newline/".. (Numbers[2].." "..Places[2].."/newline/").. (Numbers[3].." "..Places[3].."/newline/").. (Numbers[4].." "..Places[4].."/newline/").. (Numbers[5].." "..Places[5].."/newline/").. (Numbers[6].." "..Places[6].."/newline/").. (Numbers[7].." "..Places[7].."/newline/").. (Numbers[8].." "..Places[8].."/newline/").. (Numbers[9].." "..Places[9].."/newline/").. (Numbers[10].." "..Places[10].."/newline/").. (Numbers[11].." "..Places[11].."/newline/").. (Numbers[12].." "..Places[12].."/newline/").. (Numbers[13].." "..Places[13].."/newline/").. (Numbers[14].." "..Places[14].."/newline/").. (Numbers[15].." "..Places[15].."/newline/").. (Numbers[16].." "..Places[16].."/newline/").. (Numbers[17].." "..Places[17].."/newline/").. (Numbers[18].." "..Places[18].."/newline/").. (Numbers[19].." "..Places[19].."/newline/").. (Numbers[20].." "..Places[20].."/newline/").. (Numbers[21].." "..Places[21].."/newline/").. (Numbers[22].." "..Places[22].."/newline/").. (Numbers[23].." "..Places[23].."/newline/").. (Numbers[24].." "..Places[24].."/newline/").. (Numbers[25].." "..Places[25].."/newline/").. (Numbers[26].." "..Places[26].."/newline/").. (Numbers[27].." "..Places[27].."/newline/").. (Numbers[28].." "..Places[28].."/newline/").. (Numbers[29].." "..Places[29].."/newline/").. (Numbers[30].." "..Places[30].."/newline/").. (Numbers[31].." "..Places[31].."/newline/").. (Numbers[32].." "..Places[32].."/newline/").. (Numbers[33].." "..Places[33].."/newline/").. (Numbers[34].." "..Places[34].."/newline/").. (Numbers[35].." "..Places[35].."/newline/").. (Numbers[36].." "..Places[36].."/newline/").. (Numbers[37].." "..Places[37].."/newline/").. (Numbers[38].." "..Places[38].."/newline/").. (Numbers[39].." "..Places[39].."/newline/").. (Numbers[40].." "..Places[40].."/newline/").. (Numbers[41].." "..Places[41].."/newline/").. (Numbers[42].." "..Places[42].."/newline/").. (Numbers[43].." "..Places[43].."/newline/").. (Numbers[44].." "..Places[44].."/newline/") local loltext = string.gsub(list,"#%x%x%x%x%x%x","#000000") dxDrawColorText(loltext, 14, sH/3-1, sW+1 , sH-1, tocolor(0,0,0,255), TextScale, TextFont , "left", "top") dxDrawColorText(loltext, 14, sH/3, sW+1 , sH, tocolor(0,0,0,255), TextScale, TextFont , "left", "top") dxDrawColorText(loltext, 14, sH/3+1, sW+1 , sH+1, tocolor(0,0,0,255), TextScale, TextFont , "left", "top") dxDrawColorText(loltext, 13, sH/3+1, sW , sH+1, tocolor(0,0,0,255), TextScale, TextFont , "left", "top") dxDrawColorTextPuma(loltext, 12, sH/3+1, sW-1 , sH+1, tocolor(0,0,0,255), TextScale, TextFont , "left", "top") dxDrawColorText(loltext, 12, sH/3, sW-1 , sH, tocolor(0,0,0,255), TextScale, TextFont , "left", "top") dxDrawColorText(loltext, 12, sH/3-1, sW-1 , sH-1, tocolor(0,0,0,255), TextScale, TextFont , "left", "top") dxDrawColorText(loltext, 13, sH/3-1, sW , sH-1, tocolor(0,0,0,255), TextScale, TextFont , "left", "top") dxDrawColorText(list, 13, sH/3, sW , sH, tocolor(255,255,255,255), TextScale, TextFont , "left", "top") end .. You forgot remove concat's in line 47.( .. )
  10. Maybe show full code?
  11. http://www.google.com
  12. Kenix

    don t work!!

    scripter_new, Can you explain what you want create?
  13. https://community.multitheftauto.com/index.php?p= ... ils&id=844 http://code.google.com/p/multi-theft-au ... Veh1stView Не?
  14. Kenix

    save team

    No problem. I do not care whether if stolen.
  15. Kenix

    save team

    You save userdata but should save team name. On quit. getTeamName On login. getTeamFromName Because you save team name string ( in event onPlayerQuit ) and you need get team from string ( in event onPlayerLogin ). function fSaveManager ( ) local uAccount = getPlayerAccount ( source ) if uAccount and not isGuestAccount ( uAccount ) then if eventName == 'onPlayerLogin' then local sTeamName = getAccountData ( uAccount, 'team' ) if sTeamName then setPlayerTeam ( source, getTeamFromName( sTeamName ) ) end elseif eventName == 'onPlayerQuit' then local uTeam = getPlayerTeam( source ) if uTeam then uTeam = getTeamName( uTeam ) end setAccountData ( uAccount, 'team', uTeam ) end end end addEventHandler ( 'onPlayerQuit', root, fSaveManager ) addEventHandler ( 'onPlayerLogin', root, fSaveManager ) Ask questions if you not understand something.
  16. dxDrawImage and update in onClientRender event.
  17. Действительно не работает.( Ради интереса проверил сейчас ) Можешь кик сделать https://wiki.multitheftauto.com/wiki/KickPlayer
  18. Не уверен Клиент. executeCommandHandler ( 'disconnect' )
  19. It's not create any effect .. Explain:you set all arguments to 0 0 0 you stopped and again you create 0 0 0. You made the same.. I understand he need create fast move.( 2x faster ) -- uElement is your element.( player ) function fGetPointFromDistanceRotation( fX, fY, nDist, nAngle ) local nA = math.rad( 90 - nAngle ) local nDx = math.cos( nA ) * nDist local nDy = math.sin( nA ) * nDist return fX + nDx, fY + nDy end local fX, fY, fZ, fLx, fLy, fLz = getCameraMatrix( ) local fNewX, fNewY = fGetPointFromDistanceRotation( fX, fY, 10, getPedRotation( uElement ) ) setElementVelocity( uElement, fNewX, fNewY, fZ ) Just example
  20. What you want create? Explain better.
  21. viewtopic.php?f=148&t=40809 https://wiki.multitheftauto.com/wiki/Scr ... troduction https://wiki.multitheftauto.com/wiki/Int ... ng_the_GUI
  22. Kenix

    Kick ID

    What return data ID? Data ID should return element.( if you need use or it write error )
×
×
  • Create New...