Best-Killer
Members-
Posts
494 -
Joined
-
Last visited
Everything posted by Best-Killer
-
When i Login and i go near job i can't see the 3D Text But When i restar the resource i can see 3D Text please help me guys Codes : server-side : max_wanted = { community = 2, law = 3, criminal = 7 } jobRanks = { ['criminal'] = { [0] = "L.G", [50] = "L.Y.G", [75] = "Y.G", [120] = "OYG", [200] = "O.G", [310] = "G.C.L", [499] = "G.L", }, ['police officer'] = { [0] ="Officer", [90]="Corporal", [200]="Trooper", [310]="Sergeant", [450]="Captain", [600]="Commander", [900]="Chief of Police", }, ['medic'] = { [0] = "Assistant", [50] = "Training", [100]= "Nurse", [130] = "Paramedic", [200] = "Doctor", [260] = "Surgeon" }, ['mechanic'] = { [0] = "Rookie", [40] = "Wheel Specialist", [100]= "Engine Specialist", [140]= "Vehicle Professional", [200]= "Motorcycle Specialist", [245]= "Vehicle Master" }, ['fisherman'] = { [0] = "Deck Hand", [20]= "Net Baiter", [75]= "Line Thrower", [100]="Line Roller", [140]="Boat Captain", [200]="Experienced Fisherman", [270]="Underwater Trap Setter" }, ['detective'] = { [0] = "Detective", }, ['military'] = { [0] = "Military", }, ['swat'] = { [0] = "Swat", }, ['pilot'] = { [0] = "Junior flight officer", [25] = "Flight Officer", [50] = "First Officer", [120] = "Captain", [180] = "Senior Captain", [250] = "Commercial First Officer", [310] = "Commercial Captain", [390] = "Commercial Commander", [460] = "Commercial Senior Commander", }, ['stunter'] = { [0] = "Crash Dummy", [50] = "Crash", [150] = "Experienced", [200] = "Professional", [300] = "Expert BMXer" } } function getJobRankTable ( ) return jobRanks end exports['Scoreboard']:scoreboardAddColumn ( "Job", root, 90, "Job", 4 ) exports['Scoreboard']:scoreboardAddColumn ( "Job Rank", root, 90, "Job Rank", 5 ) function create3DText ( str, pos, color, parent, settings ) if str and pos and color then local text = createElement ( '3DText' ) local settings = settings or { } setElementData ( text, "text", str ) setElementData ( text, "position", pos ) setElementData ( text, "color", color ) if ( not parent ) then parent = nil else if ( isElement ( parent ) ) then parent = parent else parent = nil end end setElementData ( text, "Settings", settings ) setElementData ( text, "parentElement", parent ) setElementData ( text, "sourceResource", sourceResource or getThisResource ( )) return text end return false end addEventHandler ( "onResourceStop", root, function ( r ) for i, v in pairs ( getElementsByType ( "3DText" ) ) do if ( r == getElementData ( v, "sourceResource" ) ) then destroyElement ( v ) end end end ) function createJob ( name, x, y, z, rz ) if ( name == 'Criminal' ) then create3DText ( 'Criminal', { x, y, z }, { 255, 0, 0 }, { nil, true } ) local p = createElement ( "GodmodePed" ) setElementData ( p, "Model", 109 ) setElementData ( p, "Position", { x, y, z, rz } ) createBlip ( x, y, z, 59, 2, 255, 255, 255, 255, 0, 450 ) addEventHandler ( 'onMarkerHit', createMarker ( x, y, z - 1, 'cylinder', 2, 0, 0, 0, 0 ), function ( p ) if ( getElementType ( p ) == 'player' and not isPedInVehicle ( p ) and not isPedDead ( p ) ) then if ( getPlayerWantedLevel ( p ) > max_wanted.criminal ) then return exports['SAEGMessages']:sendClientMessage ( "The max wanted level for this job is "..tostring ( max_wanted.criminal )..".", p, 255, 0, 0 ) end triggerClientEvent ( p, 'SAEGJobs:OpenJobMenu', p, 'criminal' ) end end ) ---------------------------------- -- Law Jobs -- ---------------------------------- elseif ( name == 'Police' ) then create3DText ( 'Police', { x, y, z }, { 0, 100, 255 }, { nil, true } ) local p = createElement ( "GodmodePed" ) setElementData ( p, "Model", 286 ) setElementData ( p, "Position", { x, y, z, rz } ) createBlip ( x, y, z, 61, 2, 255, 255, 255, 255, 0, 450 ) addEventHandler ( 'onMarkerHit', createMarker ( x, y, z - 1, 'cylinder', 2, 0, 0, 0, 0 ), function ( p ) if ( getElementType ( p ) == 'player' and not isPedInVehicle ( p ) and not isPedDead ( p ) ) then if ( getPlayerWantedLevel ( p ) > max_wanted.law ) then return exports['SAEGMessages']:sendClientMessage ( "The max wanted level for this job is "..tostring ( max_wanted.law )..".", p, 255, 0, 0 ) end triggerClientEvent ( p, 'SAEGJobs:OpenJobMenu', p, 'police' ) end end ) elseif ( name == 'Detective' ) then create3DText ( 'Detective', { x, y, z }, { 0, 120, 255 }, { nil, true } ) local p = createElement ( "GodmodePed" ) setElementData ( p, "Model", 17 ) setElementData ( p, "Position", { x, y, z, rz } ) createBlip ( x, y, z, 61, 2, 255, 255, 255, 255, 0, 450 ) addEventHandler ( 'onMarkerHit', createMarker ( x, y, z - 1, 'cylinder', 2, 0, 0, 0, 0 ), function ( p ) if ( getElementType ( p ) == 'player' and not isPedInVehicle ( p ) and not isPedDead ( p ) ) then if ( getPlayerWantedLevel ( p ) > max_wanted.law ) then return exports['SAEGMessages']:sendClientMessage ( "The max wanted level for this job is "..tostring ( max_wanted.law )..".", p, 255, 0, 0 ) end local arrests = getJobColumnData ( getAccountName ( getPlayerAccount ( p ) ), getDatabaseColumnTypeFromJob ( "police officer" ) ) if ( arrests < 0 ) then return exports.SAEGMessages:sendClientMessage ( "This job requires at least 150 arrests", p, 255, 255, 0 ) end triggerClientEvent ( p, 'SAEGJobs:OpenJobMenu', p, 'detective' ) end end ) elseif ( name == 'Military' ) then create3DText ( 'Military', { x, y, z }, { 0, 120, 255 }, { nil, true } ) local p = createElement ( "GodmodePed" ) setElementData ( p, "Model", 287 ) setElementData ( p, "Position", { x, y, z, rz } ) createBlip ( x, y, z, 61, 2, 255, 255, 255, 255, 0, 450 ) addEventHandler ( 'onMarkerHit', createMarker ( x, y, z - 1, 'cylinder', 2, 0, 0, 0, 0 ), function ( p ) if ( getElementType ( p ) == 'player' and not isPedInVehicle ( p ) and not isPedDead ( p ) ) then if ( getPlayerWantedLevel ( p ) > max_wanted.law ) then return exports['SAEGMessages']:sendClientMessage ( "The max wanted level for this job is "..tostring ( max_wanted.law )..".", p, 255, 0, 0 ) end if ( getElementData(p, "Group") ~= "Military" ) then return exports['SAEGMessages']:sendClientMessage ( "This job is available only for Military members.", p, 255, 0, 0) end local arrests = getJobColumnData ( getAccountName ( getPlayerAccount ( p ) ), getDatabaseColumnTypeFromJob ( "police officer" ) ) if ( arrests < 0 ) then return exports.SAEGMessages:sendClientMessage ( "This job requires at least 150 arrests", p, 255, 255, 0 ) end triggerClientEvent ( p, 'SAEGJobs:OpenJobMenu', p, 'military' ) end end ) elseif ( name == 'SWAT' ) then create3DText ( 'SWAT', { x, y, z }, { 0, 120, 255 }, { nil, true } ) local p = createElement ( "GodmodePed" ) setElementData ( p, "Model", 285 ) setElementData ( p, "Position", { x, y, z, rz } ) createBlip ( x, y, z, 61, 2, 255, 255, 255, 255, 0, 450 ) addEventHandler ( 'onMarkerHit', createMarker ( x, y, z - 1, 'cylinder', 2, 0, 0, 0, 0 ), function ( p ) if ( getElementType ( p ) == 'player' and not isPedInVehicle ( p ) and not isPedDead ( p ) ) then if ( getPlayerWantedLevel ( p ) > max_wanted.law ) then return exports['SAEGMessages']:sendClientMessage ( "The max wanted level for this job is "..tostring ( max_wanted.law )..".", p, 255, 0, 0 ) end if ( getElementData(p, "Group") ~= "SWAT" ) then return exports['SAEGMessages']:sendClientMessage ( "This job is available only for SWAT members.", p, 255, 0, 0) end local arrests = getJobColumnData ( getAccountName ( getPlayerAccount ( p ) ), getDatabaseColumnTypeFromJob ( "police officer" ) ) if ( arrests < 0 ) then return exports.SAEGMessages:sendClientMessage ( "This job requires at least 150 arrests", p, 255, 255, 0 ) end triggerClientEvent ( p, 'SAEGJobs:OpenJobMenu', p, 'swat' ) end end ) ---------------------------------- -- Emergency Jobs -- ---------------------------------- elseif ( name == 'Medic' ) then create3DText ( 'Medic', { x, y, z }, { 0, 255, 255 }, { nil, true } ) local p = createElement ( "GodmodePed" ) setElementData ( p, "Model", 274 ) setElementData ( p, "Position", { x, y, z, rz } ) createBlip ( x, y, z, 58, 2, 255, 255, 255, 255, 0, 450 ) addEventHandler ( 'onMarkerHit', createMarker ( x, y, z - 1, 'cylinder', 2, 0, 0, 0, 0 ), function ( p ) if ( getElementType ( p ) == 'player' and not isPedInVehicle ( p ) and not isPedDead ( p ) ) then if ( getPlayerWantedLevel ( p ) > max_wanted.community ) then return exports['SAEGMessages']:sendClientMessage ( "The max wanted level for this job is "..tostring ( max_wanted.community )..".", p, 255, 0, 0 ) end triggerClientEvent ( p, 'SAEGJobs:OpenJobMenu', p, 'medic' ) end end ) ---------------------------------- -- Community Jobs -- ---------------------------------- elseif ( name == 'Mechanic' ) then create3DText ( 'Mechanic', { x, y, z }, { 255, 255, 0 }, { nil, true } ) local p = createElement ( "GodmodePed" ) setElementData ( p, "Model", 30 ) setElementData ( p, "Position", { x, y, z, rz } ) createBlip ( x, y, z, 60, 2, 255, 255, 255, 255, 0, 450 ) addEventHandler ( 'onMarkerHit', createMarker ( x, y, z - 1, 'cylinder', 2, 0, 0, 0, 0 ), function ( p ) if ( getElementType ( p ) == 'player' and not isPedInVehicle ( p ) and not isPedDead ( p ) ) then if ( getPlayerWantedLevel ( p ) > max_wanted.community ) then return exports['SAEGMessages']:sendClientMessage ( "The max wanted level for this job is "..tostring ( max_wanted.community )..".", p, 255, 0, 0 ) end
-
ERROR: SAEGLogin\server.lua:72: attempt to concatenate a boolean value what is the problem ?? that's the code : usernames = {} function onLogin ( player, user, pass ) local s = getPlayerSerial ( source ) if ( exports.SAEGBans:isSerialBanned ( s ) ) then exports.SAEGBans:loadBanScreenForPlayer ( source ) triggerClientEvent ( source, "SAEGLogin:hideLoginWindow", source ) end local account = getAccount ( user, pass ) if ( account ~= false ) then if isTimer(cooldown) then return end cooldown = setTimer(function() end, 1000, 1) if (logIn ( client, account, pass ) == true) then triggerClientEvent ( client, "hideLoginWindow", client ) triggerClientEvent ( client, "resetFields", client ) else triggerClientEvent ( client, "setWarning", client, "Something went wrong while logging!", 255, 0, 0 ) end else triggerClientEvent ( client, "setWarning", client, "Invalid login details!", 255, 0, 0 ) end end addEvent( "onLogin", true ) addEventHandler( "onLogin", getRootElement(), onLogin ) addEvent("recoverAccount", true) addEventHandler("recoverAccount", root, function( player, account, q ) local acc = getAccount(tostring(account)) if acc == false then triggerClientEvent( client, "setRecoverText", client, "Account doesn't exist!", 255, 0, 0) else if getAccountData( acc, "login:secret-answer") == tostring(q) then triggerClientEvent( client, "setRecoverText", client, "Account recovered, password: "..getAccountData(acc, "account:password"), 0, 255, 0) else triggerClientEvent( client, "setRecoverText", client, "Invalid secret answer!", 255, 0, 0) end end end ) function openView( plr ) local theplr = nil if ( source and getElementType ( source ) == 'player' ) then theplr = source elseif ( plr and getElementType ( plr ) == 'player' ) then theplr = plr end setTimer ( function ( p ) fadeCamera ( p, true ) end, 300, 1, theplr ) end addEventHandler ( "onPlayerJoin", root, openView ) addEventHandler ( "onPlayerLogout", root, openView ) function onRegister ( player, username, password, passwordConfirm, s ) if not (username == "") then if not (password == "") then if not (passwordConfirm == "") then if password == passwordConfirm then local account = getAccount (username,password) if (account == false) then local accountAdded = addAccount(tostring(username),tostring(password)) if (accountAdded) then setAccountData(accountAdded, "login:secret-answer", tostring(s)) setAccountData(accountAdded, "account:password", tostring(password)) triggerClientEvent ( client, "resetFields", client ) triggerClientEvent ( client, "setWarning", client, "You have registered, so now your final step is to login!", 0, 255, 0 ) triggerClientEvent ( client, "closeRegisterGUI", client ) onLogin (client, username, password ) exports['SAEGLogs']:outputActionLog ( getPlayerName ( source ).." has registered on the server" ) triggerClientEvent ( source, username, password, true ) setElementData ( source, "Job", "UnEmployed" ) setElementData ( source, "SAEGPlayerFunctions:Playtime_Mins", 0 ) setElementData ( source, "Playtime", "0 Hours" ) setElementData ( source, "Gang", "None" ) setElementData ( source, "Gang Rank", "None" ) exports['NGSQL']:createAccount ( username ); exports['SAEGJobs']:addPlayerToJobDatabase ( source ) exports.SAEGPlayerFunctions:setTeam(source,"Unemployed") end else triggerClientEvent ( client, "setRegisterWarning", client, "An Account with this name already exist, use another one!", 255, 0, 0 ) end else triggerClientEvent ( client, "setRegisterWarning", client, "Passwords aren't the same!", 255, 0, 0 ) end else triggerClientEvent ( client, "setRegisterWarning", client, "Confirm your password please!", 255, 0, 0 ) end else triggerClientEvent ( client, "setRegisterWarning", client, "Please enter a password!", 255, 0, 0 ) end else triggerClientEvent ( client, "setRegisterWarning", client, "Please use a username to register!", 255, 0, 0 ) end end addEvent( "onRegister", true ) addEventHandler( "onRegister", getRootElement(), onRegister ) addEventHandler('onPlayerLogin', root, function() triggerClientEvent ( source, "hideLoginWindow", source ) end ) addEventHandler("onPlayerLogout", root, function() triggerClientEvent( source, "showLogin", source ) end ) addEventHandler ( "onPlayerJoin", root, function ( ) setElementData ( source, "Job", "None" ) setElementData ( source, "Job Rank", "None" ) setElementData ( source, "Gang", "None" ) setElementData ( source, "Gang Rank", "None" ) setElementData ( source, "Money", "$0" ) setElementData ( source, "Playtime", "0 Minutes" ) setElementData ( source, "FPS", "0" ) end ) addEvent('kickPlayer', true) addEventHandler('kickPlayer', root, function() kickPlayer(client) end ) addEvent("isValidUsername", true) addEventHandler("isValidUsername", root, function(u, s) local acc = getAccount(u) if acc ~= false and u ~= "" then usernames[client] = u triggerClientEvent(client, s, client, "Seems a valid account!", 0, 255, 0) else triggerClientEvent(client, s, client, "Is it valid username?", 255, 0, 0) end end ) addEvent("isValidPassword", true) addEventHandler('isValidPassword', root, function(u, s) if not usernames[client] then triggerClientEvent(client, s, client, "Did you type the the username?", 255, 0, 0) else local pass = getAccount(usernames[client], u) if pass ~= false and not pass == "" then triggerClientEvent(client, s, client, "Valid account!", 0, 255, 0) end end end ) addEvent('isValidSecretAnswer', true) addEventHandler('isValidSecretAnswer', root, function(u, s) if u ~= "" then triggerClientEvent(client, s, client, "Seems valid secret answer!", 0, 255, 0) else triggerClientEvent(client, s, client, "Did you type something at secret answer field?", 255, 0, 0) end end ) addEvent("isValidR", true) addEventHandler("isValidR", root, function(username, p) local acc = getAccount(username) if acc == false and username ~= "" then usernames[client] = username triggerClientEvent(client, p, client, "Username is available!", 0, 255, 0) else triggerClientEvent(client, p, client, "Username is taken!", 255, 0, 0) end end ) setTimer( function() for k,v in ipairs(getElementsByType("player")) do if isGuestAccount(getPlayerAccount(v)) then triggerClientEvent( v, "showLogin", v ) end end end , 1000, 0) addEvent ( "Login:onPlayerFinishIntro", true ) addEventHandler ( "Login:onPlayerFinishIntro", root, function ( ) if source then setElementInterior ( source, 0 ) setElementDimension ( source, 0 ) fadeCamera ( source, true ) setCameraTarget ( source, source ) spawnPlayer ( source, 1546.58, -1675.31, 13.56 ) setElementModel ( source, 28 ) setPlayerMoney ( source, 1500 ) setElementRotation ( source, 0, 0, 90 ) showChat ( source, true ) showCursor ( source, false ) showPlayerHudComponent ( source, 'all', true ) end return false end ) function setMode() setGameType("SAEG:RPG") outputChatBox ("Gamemode changed", 0,255,255) end addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), setMode)
-
here idk what is the probelm Sory
-
"Everyone"> "Default"> "user.*"> "resource.*"> "Moderator"> "Moderator"> "resource.mapcycler"> "resource.mapmanager"> "resource.resourcemanager"> "resource.votemanager"> "SuperModerator"> "Moderator"> "SuperModerator"> "OWNER"> "user.kewiiNNN"> "VIP"> "user.kewiiNNN"> "Admin"> "Moderator"> "SuperModerator"> "Admin"> "RPC"> "user.kewiiNNN"> "resource.admin"> "resource.webadmin"> "resource.changeme"> "resource.loggedadmin"> "resource.acpanel"> "resource.randommoney"> "resource.loginsystem"> "resource.moddownloader"> "Console"> "Moderator"> "SuperModerator"> "Admin"> "RPC"> "user.Console"> "RPC"> "RPC"> "MapEditor"> "Default"> "MapEditor"> "resource.toolbox"> "resource.editor_main"> "resource.edf"> "raceACLGroup"> "Default"> "raceACL"> "resource.race"> "DevGroup"> "DevACL"> "autoGroup_acpanel"> "autoACL_acpanel"> "resource.acpanel"> "autoGroup_drugsystem"> "autoACL_drugsystem"> "resource.drugsystem"> "autoGroup_ModDownloader"> "autoACL_ModDownloader"> "resource.ModDownloader"> "Default"> "general.ModifyOtherObjects" access="false"> "general.http" access="false"> "command.start" access="false"> "command.stop" access="false"> "command.stopall" access="false"> "command.gamemode" access="false"> "command.changemode" access="false"> "command.changemap" access="false"> "command.stopmode" access="false"> "command.stopmap" access="false"> "command.skipmap" access="false"> "command.restart" access="false"> "command.refresh" access="false"> "command.refreshall" access="false"> "command.addaccount" access="false"> "command.delaccount" access="false"> "command.debugscript" access="false"> "command.chgpass" access="false"> "command.loadmodule" access="false"> "command.upgrade" access="false"> "command.mute" access="false"> "command.crun" access="false"> "command.srun" access="false"> "command.run" access="false"> "command.unmute" access="false"> "command.kick" access="false"> "command.ban" access="false"> "command.banip" access="false"> "command.unbanip" access="false"> "command.reloadbans" access="false"> "command.shutdown" access="false"> "command.install" access="false"> "command.aexec" access="false"> "command.whois" access="false"> "command.whowas" access="false"> "function.executeCommandHandler" access="false"> "function.setPlayerMuted" access="false"> "function.addAccount" access="false"> "function.addBan" access="false"> "function.setUnbanTime" access="false"> "function.setBanAdmin" access="false"> "function.setBanReason" access="false"> "function.removeBan" access="false"> "function.removeAccount" access="false"> "function.setAccountPassword" access="false"> "function.kickPlayer" access="false"> "function.banIP" access="false"> "function.banPlayer" access="false"> "function.banSerial" access="false"> "function.getBansXML" access="false"> "function.unbanIP" access="false"> "function.unbanSerial" access="false"> "function.reloadBans" access="false"> "function.setServerPassword" access="false"> "function.getServerPassword" access="false"> "function.callRemote" access="false"> "function.fetchRemote" access="false"> "function.startResource" access="false"> "function.stopResource" access="false"> "function.restartResource" access="false"> "function.createResource" access="false"> "function.copyResource" access="false"> "function.addResourceMap" access="false"> "function.addResourceConfig" access="false"> "function.removeResourceFile" access="false"> "function.setResourceDefaultSetting" access="false"> "function.removeResourceDefaultSetting" access="false"> "function.redirectPlayer" access="false"> "function.aclReload" access="false"> "function.aclSave" access="false"> "function.aclCreate" access="false"> "function.aclDestroy" access="false"> "function.aclSetRight" access="false"> "function.aclRemoveRight" access="false"> "function.aclCreateGroup" access="false"> "function.aclDestroyGroup" access="false"> "function.aclGroupAddACL" access="false"> "function.aclGroupRemoveACL" access="false"> "function.aclGroupAddObject" access="false"> "function.aclGroupRemoveObject" access="false"> "function.refreshResources" access="false"> "function.setServerConfigSetting" access="false"> "function.updateResourceACLRequest" access="false"> "command.aclrequest" access="false"> "general.adminpanel" access="false"> "general.tab_players" access="false"> "general.tab_resources" access="false"> "general.tab_maps" access="false"> "general.tab_server" access="false"> "general.tab_bans" access="false"> "general.tab_adminchat" access="false"> "command.freeze" access="false"> "command.setnick" access="false"> "command.shout" access="false"> "command.spectate" access="false"> "command.slap" access="false"> "command.setgroup" access="false"> "command.sethealth" access="false"> "command.setarmour" access="false"> "command.setmoney" access="false"> "command.setskin" access="false"> "command.setteam" access="false"> "command.giveweapon" access="false"> "command.setstat" access="false"> "command.jetpack" access="false"> "command.warp" access="false"> "command.setdimension" access="false"> "command.setinterior" access="false"> "command.givevehicle" access="false"> "command.repair" access="false"> "command.blow" access="false"> "command.destroy" access="false"> "command.customize" access="false"> "command.setcolor" access="false"> "command.setpaintjob" access="false"> "command.listmessages" access="false"> "command.readmessage" access="false"> "command.listresources" access="false"> "command.execute" access="false"> "command.delete" access="false"> "command.setpassword" access="false"> "command.setwelcome" access="false"> "command.setgame" access="false"> "command.setmap" access="false"> "command.setweather" access="false"> "command.blendweather" access="false"> "command.setblurlevel" access="false"> "command.setwaveheight" access="false"> "command.setskygradient" access="false"> "command.setgamespeed" access="false"> "command.setgravity" access="false"> "command.settime" access="false"> "function.shutdown" access="false"> "command.setfpslimit" access="false"> "command.fetchRemote" access="false"> "command.unban" access="false"> "command.banserial" access="false"> "command.unbanserial" access="false"> "command.listbans" access="false"> "command.createteam" access="false"> "command.destroyteam" access="false"> "command.blowvehicle" access="false"> "command.destroyvehicle" access="false"> "Moderator"> "general.ModifyOtherObjects" access="false"> "command.gamemode" access="true"> "command.changemode" access="true"> "command.changemap" access="true"> "command.stopmode" access="true"> "command.stopmap" access="true"> "command.skipmap" access="true"> "command.mute" access="true"> "command.unmute" access="true"> "command.whois" access="true"> "command.whowas" access="true"> "function.setPlayerMuted" access="true"> "function.kickPlayer" access="true"> "function.banIP" access="true"> "function.banPlayer" access="true"> "function.banSerial" access="true"> "function.getBansXML" access="true"> "function.unbanIP" access="true"> "function.unbanSerial" access="true"> "function.startResource" access="true"> "function.stopResource" access="true"> "function.restartResource" access="true"> "function.redirectPlayer" access="true"> "general.adminpanel" access="true"> "general.tab_players" access="true"> "general.tab_resources" access="false"> "general.tab_maps" access="false"> "general.tab_server" access="true"> "general.tab_bans" access="false"> "general.tab_adminchat" access="true"> "command.kick" access="false"> "command.freeze" access="true"> "command.setnick" access="true"> "command.shout" access="true"> "command.spectate" access="true"> "command.slap" access="true"> "command.setgroup" access="false"> "command.sethealth" access="true"> "command.setarmour" access="true"> "command.setmoney" access="false"> "command.setskin" access="true"> "command.setteam" access="true"> "command.giveweapon" access="true"> "command.setstat" access="true"> "command.jetpack" access="true"> "command.warp" access="true"> "command.setdimension" access="true"> "command.setinterior" access="true"> "command.createteam" access="false"> "command.destroyteam" access="false"> "command.givevehicle" access="true"> "command.repair" access="true"> "command.blowvehicle" access="true"> "command.destroyvehicle" access="true"> "command.customize" access="true"> "command.setcolor" access="true"> "command.setpaintjob" access="true"> "command.listmessages" access="true"> "command.readmessage" access="true"> "command.listresources" access="true"> "command.start" access="false"> "command.stop" access="false"> "command.stopall" access="false"> "command.restart" access="false"> "command.execute" access="false"> "command.setpassword" access="false"> "command.setwelcome" access="false"> "command.setgame" access="false"> "command.setmap" access="false"> "command.setweather" access="true"> "command.blendweather" access="true"> "command.setblurlevel" access="true"> "command.setwaveheight" access="true"> "command.setskygradient" access="true"> "command.setgamespeed" access="true"> "command.setgravity" access="true"> "command.settime" access="true"> "command.ban" access="false"> "command.unban" access="false"> "command.banip" access="false"> "command.unbanip" access="false"> "command.banserial" access="false"> "command.unbanserial" access="false"> "command.listbans" access="false"> "command.delete" access="false"> "command.setfpslimit" access="false"> "SuperModerator"> "general.ModifyOtherObjects" access="false"> "command.start" access="true"> "command.stop" access="true"> "command.restart" access="true"> "command.kick" access="true"> "command.ban" access="true"> "command.banip" access="true"> "command.unbanip" access="true"> "command.reloadbans" access="true"> "command.refresh" access="true"> "command.refreshall" access="true"> "command.loadmodule" access="true"> "command.addaccount" access="true"> "command.delaccount" access="true"> "command.chgpass" access="true"> "function.addAccount" access="true"> "function.removeAccount" access="true"> "function.setAccountPassword" access="true"> "general.adminpanel" access="true"> "general.tab_players" access="true"> "general.tab_resources" access="true"> "general.tab_maps" access="true"> "general.tab_server" access="true"> "general.tab_bans" access="true"> "general.tab_adminchat" access="true"> "command.freeze" access="true"> "command.mute" access="true"> "command.setnick" access="true"> "command.shout" access="true"> "command.spectate" access="true"> "command.slap" access="true"> "command.setgroup" access="false"> "command.sethealth" access="true"> "command.setarmour" access="true"> "command.setmoney" access="true"> "command.setskin" access="true"> "command.setteam" access="true"> "command.giveweapon" access="true"> "command.setstat" access="true"> "command.jetpack" access="true"> "command.warp" access="true"> "command.setdimension" access="true"> "command.setinterior" access="true"> "command.createteam" access="true"> "command.destroyteam" access="true"> "command.givevehicle" access="true"> "command.repair" access="true"> "command.blowvehicle" access="true"> "command.destroyvehicle" access="true"> "command.customize" access="true"> "command.setcolor" access="true"> "command.setpaintjob" access="true"> "command.listmessages" access="true"> "command.readmessage" access="true"> "command.listresources" access="true"> "command.stopall" access="false"> "command.execute" access="false"> "command.setpassword" access="true"> "command.setwelcome" access="true"> "command.setgame" access="true"> "command.setmap" access="true"> "command.setweather" access="true"> "command.blendweather" access="true"> "command.setblurlevel" access="true"> "command.setwaveheight" access="true"> "command.setskygradient" access="true"> "command.setgamespeed" access="true"> "command.setgravity" access="true"> "command.settime" access="true"> "command.unban" access="true"> "command.banserial" access="true"> "command.unbanserial" access="true"> "command.listbans" access="true"> "command.delete" access="false"> "command.setfpslimit" access="false"> "Admin"> "general.ModifyOtherObjects" access="true"> "general.http" access="true"> "command.shutdown" access="true"> "command.install" access="true"> "command.aexec" access="true"> "command.debugscript" access="true"> "command.upgrade" access="true"> "command.crun" access="true"> "command.srun" access="true"> "command.run" access="true"> "function.addBan" access="true"> "function.setUnbanTime" access="true"> "function.setBanAdmin" access="true"> "function.setBanReason" access="true"> "function.removeBan" access="true"> "function.reloadBans" access="true"> "function.executeCommandHandler" access="true"> "function.setServerPassword" access="true"> "function.getServerPassword" access="true"> "function.createResource" access="true"> "function.copyResource" access="true"> "function.addResourceMap" access="true"> "function.addResourceConfig" access="true"> "function.removeResourceFile" access="true"> "function.setResourceDefaultSetting" access="true"> "function.removeResourceDefaultSetting" access="true"> "function.aclReload" access="true"> "function.aclSave" access="true"> "function.aclCreate" access="true"> "function.aclDestroy" access="true"> "function.aclSetRight" access="true"> "function.aclRemoveRight" access="true"> "function.aclCreateGroup" access="true"> "function.aclDestroyGroup" access="true"> "function.aclGroupAddACL" access="true"> "function.aclGroupRemoveACL" access="true"> "function.aclGroupAddObject" access="true"> "function.aclGroupRemoveObject" access="true"> "function.refreshResources" access="true"> "function.setServerConfigSetting" access="true"> "function.updateResourceACLRequest" access="true"> "command.aclrequest" access="true"> "general.adminpanel" access="true"> "general.tab_players" access="true"> "general.tab_resources" access="true"> "general.tab_server" access="true"> "general.tab_maps" access="true"> "general.tab_bans" access="true"> "general.tab_adminchat" access="true"> "command.kick" access="true"> "command.freeze" access="true"> "command.mute" access="true"> "command.setnick" access="true"> "command.shout" access="true"> "command.spectate" access="true"> "command.slap" access="true"> "command.setgroup" access="true"> "command.sethealth" access="true"> "command.setarmour" access="true"> "command.setmoney" access="true"> "command.setskin" access="true"> "command.setteam" access="true"> "command.giveweapon" access="true"> "command.setstat" access="true"> "command.jetpack" access="true"> "command.warp" access="true"> "command.setdimension" access="true"> "command.setinterior" access="true"> "command.createteam" access="true"> "command.destroyteam" access="true"> "command.givevehicle" access="true"> "command.repair" access="true"> "command.blowvehicle" access="true"> "command.destroyvehicle" access="true"> "command.customize" access="true"> "command.setcolor" access="true"> "command.setpaintjob" access="true"> "command.listmessages" access="true"> "command.readmessage" access="true"> "command.listresources" access="true"> "command.start" access="true"> "command.stop" access="true"> "command.stopall" access="false"> "command.delete" access="true"> "command.restart" access="true"> "command.execute" access="true"> "command.setpassword" access="true"> "command.setwelcome" access="true"> "command.setgame" access="true"> "command.setmap" access="true"> "command.setweather" access="true"> "command.blendweather" access="true"> "command.setblurlevel" access="true"> "command.setwaveheight" access="true"> "command.setskygradient" access="true"> "command.setgamespeed" access="true"> "command.setgravity" access="true"> "command.settime" access="true"> "command.setfpslimit" access="true"> "function.shutdown" access="true"> "command.ban" access="true"> "command.unban" access="true"> "command.banip" access="true"> "command.unbanip" access="true"> "command.banserial" access="true"> "command.unbanserial" access="true"> "command.listbans" access="true"> "RPC"> "function.callRemote" access="true"> "function.fetchRemote" access="true"> "general.adminpanel" access="false"> "general.tab_players" access="false"> "general.tab_resources" access="false"> "general.tab_maps" access="false"> "general.tab_server" access="false"> "general.tab_bans" access="false"> "general.tab_adminchat" access="false"> "command.kick" access="false"> "command.freeze" access="false"> "command.mute" access="false"> "command.setnick" access="false"> "command.shout" access="false"> "command.spectate" access="false"> "command.slap" access="false"> "command.setgroup" access="false"> "command.sethealth" access="false"> "command.setarmour" access="false"> "command.setmoney" access="false"> "command.setskin" access="false"> "command.setteam" access="false"> "command.giveweapon" access="false"> "command.setstat" access="false"> "command.jetpack" access="false"> "command.warp" access="false"> "command.setdimension" access="false"> "command.setinterior" access="false"> "command.givevehicle" access="false"> "command.repair" access="false"> "command.blow" access="false"> "command.destroy" access="false"> "command.customize" access="false"> "command.setcolor" access="false"> "command.setpaintjob" access="false"> "command.listmessages" access="false"> "command.readmessage" access="false"> "command.listresources" access="false"> "command.start" access="false"> "command.stop" access="false"> "command.stopall" access="false"> "command.restart" access="false"> "command.execute" access="false"> "command.delete" access="false"> "command.setpassword" access="false"> "command.setwelcome" access="false"> "command.setgame" access="false"> "command.setmap" access="false"> "command.setweather" access="false"> "command.blendweather" access="false"> "command.setblurlevel" access="false"> "command.setwaveheight" access="false"> "command.setskygradient" access="false"> "command.setgamespeed" access="false"> "command.setgravity" access="false"> "command.settime" access="false"> "function.shutdown" access="false"> "command.setfpslimit" access="false"> "command.fetchRemote" access="false"> "command.ban" access="false"> "command.unban" access="false"> "command.banip" access="false"> "command.unbanip" access="false"> "command.banserial" access="false"> "command.unbanserial" access="false"> "command.listbans" access="false"> "command.createteam" access="false"> "command.destroyteam" access="false"> "command.blowvehicle" access="false"> "command.destroyvehicle" access="false"> "MapEditor"> "general.ModifyOtherObjects" access="true"> "function.startResource" access="true"> "function.stopResource" access="true"> "function.restartResource" access="true"> "function.createResource" access="true"> "function.copyResource" access="true"> "function.renameResource" access="true"> "function.deleteResource" access="true"> "function.addResourceMap" access="true"> "function.addResourceConfig" access="true"> "function.removeResourceFile" access="true"> "function.setResourceDefaultSetting" access="true"> "function.removeResourceDefaultSetting" access="true"> "function.xmlLoadFile" access="true"> "general.adminpanel" access="false"> "general.tab_players" access="false"> "general.tab_resources" access="false"> "general.tab_maps" access="false"> "general.tab_server" access="false"> "general.tab_bans" access="false"> "general.tab_adminchat" access="false"> "command.kick" access="false"> "command.freeze" access="false"> "command.mute" access="false"> "command.setnick" access="false"> "command.shout" access="false"> "command.spectate" access="false"> "command.slap" access="false"> "command.setgroup" access="false"> "command.sethealth" access="false"> "command.setarmour" access="false"> "command.setmoney" access="false"> "command.setskin" access="false"> "command.setteam" access="false"> "command.giveweapon" access="false"> "command.setstat" access="false"> "command.jetpack" access="false"> "command.warp" access="false"> "command.setdimension" access="false"> "command.setinterior" access="false"> "command.givevehicle" access="false"> "command.repair" access="false"> "command.blow" access="false"> "command.destroy" access="false"> "command.customize" access="false"> "command.setcolor" access="false"> "command.setpaintjob" access="false"> "command.listmessages" access="false"> "command.readmessage" access="false"> "command.listresources" access="false"> "command.start" access="false"> "command.stop" access="false"> "command.stopall" access="false"> "command.restart" access="false"> "command.execute" access="false"> "command.delete" access="false"> "command.setpassword" access="false"> "command.setwelcome" access="false"> "command.setgame" access="false"> "command.setmap" access="false"> "command.setweather" access="false"> "command.blendweather" access="false"> "command.setblurlevel" access="false"> "command.setwaveheight" access="false"> "command.setskygradient" access="false"> "command.setgamespeed" access="false"> "command.setgravity" access="false"> "command.settime" access="false"> "function.shutdown" access="false"> "command.setfpslimit" access="false"> "command.fetchRemote" access="false"> "command.ban" access="false"> "command.unban" access="false"> "command.banip" access="false"> "command.unbanip" access="false"> "command.banserial" access="false"> "command.unbanserial" access="false"> "command.listbans" access="false"> "command.createteam" access="false"> "command.destroyteam" access="false"> "command.blowvehicle" access="false"> "command.destroyvehicle" access="false"> "raceACL"> "general.ModifyOtherObjects" access="true"> "function.xmlLoadFile" access="true"> "function.startResource" access="true"> "function.stopResource" access="true"> "function.restartResource" access="true"> "general.adminpanel" access="false"> "general.tab_players" access="false"> "general.tab_resources" access="false"> "general.tab_maps" access="false"> "general.tab_server" access="false"> "general.tab_bans" access="false"> "general.tab_adminchat" access="false"> "command.kick" access="false"> "command.freeze" access="false"> "command.mute" access="false"> "command.setnick" access="false"> "command.shout" access="false"> "command.spectate" access="false"> "command.slap" access="false"> "command.setgroup" access="false"> "command.sethealth" access="false"> "command.setarmour" access="false"> "command.setmoney" access="false"> "command.setskin" access="false"> "command.setteam" access="false"> "command.giveweapon" access="false"> "command.setstat" access="false"> "command.jetpack" access="false"> "command.warp" access="false"> "command.setdimension" access="false"> "command.setinterior" access="false"> "command.givevehicle" access="false"> "command.repair" access="false"> "command.blow" access="false"> "command.destroy" access="false"> "command.customize" access="false"> "command.setcolor" access="false"> "command.setpaintjob" access="false"> "command.listmessages" access="false"> "command.readmessage" access="false"> "command.listresources" access="false"> "command.start" access="false"> "command.stop" access="false"> "command.stopall" access="false"> "command.restart" access="false"> "command.execute" access="false"> "command.delete" access="false"> "command.setpassword" access="false"> "command.setwelcome" access="false"> "command.setgame" access="false"> "command.setmap" access="false"> "command.setweather" access="false"> "command.blendweather" access="false"> "command.setblurlevel" access="false"> "command.setwaveheight" access="false"> "command.setskygradient" access="false"> "command.setgamespeed" access="false"> "command.setgravity" access="false"> "command.settime" access="false"> "function.shutdown" access="false"> "command.setfpslimit" access="false"> "command.fetchRemote" access="false"> "command.ban" access="false"> "command.unban" access="false"> "command.banip" access="false"> "command.unbanip" access="false"> "command.banserial" access="false"> "command.unbanserial" access="false"> "command.listbans" access="false"> "command.createteam" access="false"> "command.destroyteam" access="false"> "command.blowvehicle" access="false"> "command.destroyvehicle" access="false"> "DevACL"> "resource.performancebrowser.http" access="true"> "resource.ajax.http" access="true"> "general.adminpanel" access="false"> "general.tab_players" access="false"> "general.tab_resources" access="false"> "general.tab_maps" access="false"> "general.tab_server" access="false"> "general.tab_bans" access="false"> "general.tab_adminchat" access="false"> "command.kick" access="false"> "command.freeze" access="false"> "command.mute" access="false"> "command.setnick" access="false"> "command.shout" access="false"> "command.spectate" access="false"> "command.slap" access="false"> "command.setgroup" access="false"> "command.sethealth" access="false"> "command.setarmour" access="false"> "command.setmoney" access="false"> "command.setskin" access="false"> "command.setteam" access="false"> "command.giveweapon" access="false"> "command.setstat" access="false"> "command.jetpack" access="false"> "command.warp" access="false"> "command.setdimension" access="false"> "command.setinterior" access="false"> "command.givevehicle" access="false"> "command.repair" access="false"> "command.blow" access="false"> "command.destroy" access="false"> "command.customize" access="false"> "command.setcolor" access="false"> "command.setpaintjob" access="false"> "command.listmessages" access="false"> "command.readmessage" access="false"> "command.listresources" access="false"> "command.start" access="false"> "command.stop" access="false"> "command.stopall" access="false"> "command.restart" access="false"> "command.execute" access="false"> "command.delete" access="false"> "command.setpassword" access="false"> "command.setwelcome" access="false"> "command.setgame" access="false"> "command.setmap" access="false"> "command.setweather" access="false"> "command.blendweather" access="false"> "command.setblurlevel" access="false"> "command.setwaveheight" access="false"> "command.setskygradient" access="false"> "command.setgamespeed" access="false"> "command.setgravity" access="false"> "command.settime" access="false"> "function.shutdown" access="false"> "command.setfpslimit" access="false"> "command.fetchRemote" access="false"> "command.ban" access="false"> "command.unban" access="false"> "command.banip" access="false"> "command.unbanip" access="false"> "command.banserial" access="false"> "command.unbanserial" access="false"> "command.listbans" access="false"> "command.createteam" access="false"> "command.destroyteam" access="false"> "command.blowvehicle" access="false"> "command.destroyvehicle" access="false"> "autoACL_acpanel"> "function.setServerConfigSetting" access="true" who="Console" pending="false" date="2014-10-18 01:51:04"> "function.kickPlayer" access="true" who="Console" pending="false" date="2014-10-18 01:51:04"> "function.fetchRemote" access="true" who="Console" pending="false" date="2014-10-18 01:51:04"> "autoACL_drugsystem"> "function.callRemote" access="true" who="" pending="true" date=""> "function.fetchRemote" access="true" who="" pending="true" date=""> "autoACL_ModDownloader"> "function.restartResource" access="true" who="" pending="true" date=""> "function.callRemote" access="true" who="" pending="true" date=""> now it's will work fine
-
It's Sloved But Thanks You
-
that all eunctions : Server : getPlayerLevel setPlayerLevel getPlayerEXP setPlayerEXP addPlayerEXP getAccountLevel setAccountLevel getAccountEXP setAccountEXP addAccountEXP getLevelData loadLevelsFromXML Client : getLevelData getPlayerEXP getPlayerLevel
-
Use : OnPlayerLogin GivePlayerMoney
-
Use : https://wiki.multitheftauto.com/wiki/Se ... inDistance
-
Hi all i have my own script to spawn cars that has a gui when the player hits the marker. And i want to add some cars to the Gui but only for players in Vip Script group called "getVipLevelFromName" Codes : Vip server side : print_ = print print = outputChatBox exports.scoreboard:scoreboardAddColumn ( "VIP", root, 50, "VIP", 10 ) for i, v in pairs ( getElementsByType ( "player" ) ) do if ( not getElementData ( v, "VIP" ) ) then setElementData ( v, "VIP", "None" ) end end addEventHandler ( "onPlayerJoin", root, function ( ) setElementData ( source, "VIP", "None" ) end ) -- VIP Chat -- addCommandHandler ( "vipchat", function ( p, cmd, ... ) if ( not isPlayerVIP ( p ) ) then return exports.SAEGMessages:sendClientMessage ( "This command is for VIP users only", p, 255, 0, 0 ) end if ( isPlayerMuted ( p ) ) then return exports.SAEGMessages:sendClientMessage ( "This command is disabled when you're muted", p, 255, 255, 0 ) end if ( not getElementData ( p, "userSettings" )['usersetting_display_vipchat'] ) then return exports.SAEGMessages:sendClientMessage ( "Please enable VIP chat in your phone settings to use this command.", 0, 255, 255 ) end local msg = table.concat ( { ... }, " " ) if ( msg:gsub ( " ", "" ) == "" ) then return exports.SAEGMessages:sendClientMessage ( "Syntax: /"..tostring(cmd).." [message]", p, 255, 255, 0 ) end local tags = "(VIP)"..tostring(exports.SAEGChat:getPlayerTags ( p )) local msg = tags..getPlayerName ( p )..": #ffffff"..msg for i,v in pairs ( getElementsByType ( 'player' ) ) do if ( ( isPlayerVIP ( v ) or exports.SAEGAdministration:isPlayerStaff ( p ) ) and getElementData ( v, "userSettings" )['usersetting_display_vipchat'] ) then outputChatBox ( msg, v, 200, 200, 0, true ) end end end ) function checkPlayerVipTime ( p ) local vip = getElementData ( p, "VIP" ) if ( vip == "None" ) then return end local expDate = getElementData ( p, "SAEGVIP.expDate" ) or "0000-00-00" -- Format: YYYY-MM-DD if ( isDatePassed ( expDate ) ) then setElementData ( p, "VIP", "None" ) setElementData ( p, "SAEGVIP.expDate", "0000-00-00" ) exports.NGMessages:sendClientMessage ( "Your VIP time has been expired.", p, 255, 0, 0 ) end end function checkAllPlayerVIP ( ) for i, v in pairs ( getElementsByType ( "player" ) ) do checkPlayerVipTime ( v ) end end function isPlayerVIP ( p ) checkPlayerVipTime ( p ) return tostring ( getElementData ( p, "VIP" ) ):lower ( ) ~= "none" end function getVipLevelFromName ( l ) local levels = { ['none'] = 0, ['bronze'] = 1, ['silver'] = 2, ['gold'] = 3, ['Premium'] = 4 } return levels[l:lower()] or 0; end ------------------------------------------ -- Give VIP players free cash -- ------------------------------------------ local payments = { [1] = 500, [2] = 700, [3] = 1000, [4] = 1500 } VipPayoutTimer = setTimer ( function ( ) exports.SAEGLogs:outputServerLog ( "Sending out VIP cash...." ) print_ ( "Sending out VIP cash...." ) outputDebugString ( "Sending VIP cash" ) for i, v in ipairs ( getElementsByType ( "player" ) ) do if ( isPlayerVIP ( v ) ) then local l = getVipLevelFromName ( getElementData ( v, "VIP" ) ) local money = payments [ l ] givePlayerMoney ( v, money ) exports.SAEGMessages:sendClientMessage ( "Here is a free $"..money.." for being a VIP player!", v, 0, 255, 0 ) end end end, (60*60)*1000, 0 ) function getVipPayoutTimerDetails ( ) return getTimerDetails ( VipPayoutTimer ) end function isDatePassed ( date ) -- date format: YYYY-MM-DD local this = { } local time = getRealTime ( ); this.year = time.year + 1900 this.month = time.month + 1 this.day = time.monthday local old = { } local data = split ( date, "-" ) old.year = data[1]; old.month = data[2]; old.day = data[3]; for i, v in pairs ( this ) do this [ i ] = tonumber ( v ) end for i, v in pairs ( old ) do old [ i ] = tonumber ( v ) end if ( this.year > old.year ) then return true elseif ( this.year == old.year and this.month > old.month ) then return true elseif ( this.year == old.year and this.month == old.month and this.day > old.day ) then return true end return false end addEventHandler( "onResourceStart", resourceRoot, function ( ) checkAllPlayerVIP ( ) setTimer ( checkAllPlayerVIP, 120000, 0 ) end ) Vip Client Side : function isPlayerVIP ( ) return tostring ( getElementData ( localPlayer, "VIP" ) ):lower ( ) ~= "none" end function getVipLevelFromName ( l ) local levels = { ['none'] = 0, ['bronze'] = 1, ['silver'] = 2, ['gold'] = 3, ['diamond'] = 4 } return levels[l:lower()] or 0; end Spawners Client Side jWin = guiCreateWindow(550,560,200,200,"SAEG Vehicle Spawner",false) guiSetVisible(jWin,false) function openGui() guiSetVisible(jWin,true) function spawnveh(button, press) if(press) then if(button == "1") then x, y, z = getElementPosition(localPlayer) triggerServerEvent("crVeh", getRootElement(), 468, x, y, z, localPlayer) end if(button == "2") then x, y, z = getElementPosition(localPlayer) triggerServerEvent("crVeh", getRootElement(), 457, x, y, z, localPlayer) end if(button == "3") then x, y, z = getElementPosition(localPlayer) triggerServerEvent("crVeh", getRootElement(), 412, x, y, z, localPlayer) end end end addEventHandler("onClientKey", getRootElement(), spawnveh) guiWindowSetSizable(jWin,false) tGrid = guiCreateGridList(0,20,190,170,false,jWin) guiGridListAddColumn(tGrid, "Key", 0.20) guiGridListAddColumn(tGrid, "Name", 0.65) row1 = guiGridListAddRow(tGrid) row2 = guiGridListAddRow(tGrid) row3 = guiGridListAddRow(tGrid) guiGridListSetItemText(tGrid, row1, 1, tostring(row1+1), false, false) guiGridListSetItemText(tGrid, row1, 2, "Sanchez", false, false) guiGridListSetItemText(tGrid, row2, 1, tostring(row2+1), false, false) guiGridListSetItemText(tGrid, row2, 2, "Caddy", false, false) guiGridListSetItemText(tGrid, row3, 1, tostring(row3+1), false, false) guiGridListSetItemText(tGrid, row3, 2, "Voodoo", false, false) end addEvent("markerHitted", true) addEventHandler("markerHitted", getRootElement(), openGui) function hideGui() guiSetVisible(jWin,false) removeEventHandler("onClientKey", getRootElement(), spawnveh) end addEvent("markerLeaved", true) addEventHandler("markerLeaved", getRootElement(), hideGui)
-
post codes or add me in skype : oussama.blide
-
when register it's work fine but when the player login : http://imgur.com/8Ll8ewj see the problem in image debugscript 3 = 0 errors , 0 warnings server side code : usernames = {} function onLogin ( player, user, pass ) local s = getPlayerSerial ( source ) if ( exports.SAEGBans:isSerialBanned ( s ) ) then exports.SAEGBans:loadBanScreenForPlayer ( source ) triggerClientEvent ( source, "SAEGLogin:hideLoginWindow", source ) end local account = getAccount ( user, pass ) if ( account ~= false ) then if isTimer(cooldown) then return end cooldown = setTimer(function() end, 1000, 1) if (logIn ( client, account, pass ) == true) then triggerClientEvent ( client, "hideLoginWindow", client ) triggerClientEvent ( client, "resetFields", client ) else triggerClientEvent ( client, "setWarning", client, "Something went wrong while logging!", 255, 0, 0 ) end else triggerClientEvent ( client, "setWarning", client, "Invalid login details!", 255, 0, 0 ) end end addEvent( "onLogin", true ) addEventHandler( "onLogin", getRootElement(), onLogin ) addEvent("recoverAccount", true) addEventHandler("recoverAccount", root, function( player, account, q ) local acc = getAccount(tostring(account)) if acc == false then triggerClientEvent( client, "setRecoverText", client, "Account doesn't exist!", 255, 0, 0) else if getAccountData( acc, "login:secret-answer") == tostring(q) then triggerClientEvent( client, "setRecoverText", client, "Account recovered, password: "..getAccountData(acc, "account:password"), 0, 255, 0) else triggerClientEvent( client, "setRecoverText", client, "Invalid secret answer!", 255, 0, 0) end end end ) function openView( plr ) local theplr = nil if ( source and getElementType ( source ) == 'player' ) then theplr = source elseif ( plr and getElementType ( plr ) == 'player' ) then theplr = plr end setTimer ( function ( p ) fadeCamera ( p, true ) end, 300, 1, theplr ) end addEventHandler ( "onPlayerJoin", root, openView ) addEventHandler ( "onPlayerLogout", root, openView ) function onRegister ( player, username, password, passwordConfirm, s ) if not (username == "") then if not (password == "") then if not (passwordConfirm == "") then if password == passwordConfirm then local account = getAccount (username,password) if (account == false) then local accountAdded = addAccount(tostring(username),tostring(password)) if (accountAdded) then setAccountData(accountAdded, "login:secret-answer", tostring(s)) setAccountData(accountAdded, "account:password", tostring(password)) triggerClientEvent ( client, "resetFields", client ) triggerClientEvent ( client, "setWarning", client, "You have registered, so now your final step is to login!", 0, 255, 0 ) triggerClientEvent ( client, "closeRegisterGUI", client ) onLogin (client, username, password ) end else triggerClientEvent ( client, "setRegisterWarning", client, "An Account with this name already exist, use another one!", 255, 0, 0 ) end else triggerClientEvent ( client, "setRegisterWarning", client, "Passwords aren't the same!", 255, 0, 0 ) end else triggerClientEvent ( client, "setRegisterWarning", client, "Confirm your password please!", 255, 0, 0 ) end else triggerClientEvent ( client, "setRegisterWarning", client, "Please enter a password!", 255, 0, 0 ) end else triggerClientEvent ( client, "setRegisterWarning", client, "Please use a username to register!", 255, 0, 0 ) end end addEvent( "onRegister", true ) addEventHandler( "onRegister", getRootElement(), onRegister ) addEventHandler('onPlayerLogin', root, function() triggerClientEvent ( source, "hideLoginWindow", source ) end ) addEventHandler("onPlayerLogout", root, function() triggerClientEvent( source, "showLogin", source ) end ) addEventHandler ( "onPlayerJoin", root, function ( ) setElementData ( source, "Job", "None" ) setElementData ( source, "Job Rank", "None" ) setElementData ( source, "Gang", "None" ) setElementData ( source, "Gang Rank", "None" ) setElementData ( source, "Money", "$0" ) setElementData ( source, "Playtime", "0 Minutes" ) setElementData ( source, "FPS", "0" ) end ) addEvent('kickPlayer', true) addEventHandler('kickPlayer', root, function() kickPlayer(client) end ) addEvent("isValidUsername", true) addEventHandler("isValidUsername", root, function(u, s) local acc = getAccount(u) if acc ~= false and u ~= "" then usernames[client] = u triggerClientEvent(client, s, client, "Seems a valid account!", 0, 255, 0) else triggerClientEvent(client, s, client, "Is it valid username?", 255, 0, 0) end end ) addEvent("isValidPassword", true) addEventHandler('isValidPassword', root, function(u, s) if not usernames[client] then triggerClientEvent(client, s, client, "Did you type the the username?", 255, 0, 0) else local pass = getAccount(usernames[client], u) if pass ~= false and not pass == "" then triggerClientEvent(client, s, client, "Valid account!", 0, 255, 0) end end end ) addEvent('isValidSecretAnswer', true) addEventHandler('isValidSecretAnswer', root, function(u, s) if u ~= "" then triggerClientEvent(client, s, client, "Seems valid secret answer!", 0, 255, 0) else triggerClientEvent(client, s, client, "Did you type something at secret answer field?", 255, 0, 0) end end ) addEvent("isValidR", true) addEventHandler("isValidR", root, function(username, p) local acc = getAccount(username) if acc == false and username ~= "" then usernames[client] = username triggerClientEvent(client, p, client, "Username is available!", 0, 255, 0) else triggerClientEvent(client, p, client, "Username is taken!", 255, 0, 0) end end ) setTimer( function() for k,v in ipairs(getElementsByType("player")) do if isGuestAccount(getPlayerAccount(v)) then triggerClientEvent( v, "showLogin", v ) end end end , 1000, 0) addEvent ( "Login:onPlayerFinishIntro", true ) addEventHandler ( "Login:onPlayerFinishIntro", root, function ( ) if source then setElementInterior ( source, 0 ) setElementDimension ( source, 0 ) fadeCamera ( source, true ) setCameraTarget ( source, source ) spawnPlayer ( source, 1546.58, -1675.31, 13.56 ) setElementModel ( source, 28 ) setPlayerMoney ( source, 1500 ) setElementRotation ( source, 0, 0, 90 ) showChat ( source, true ) showCursor ( source, false ) showPlayerHudComponent ( source, 'all', true ) end return false end ) Help Me Please
-
function allvehiclesaredoomed() vehicles = getElementsByType("vehicle") for i,v in ipairs(vehicles) do destroyElement(v) end end addCommandHandler("dv", allvehiclesaredoomed)
-
Post Your Acl
-
like the sample vehicle spawner but that spawner you can spawn your own vehicle when you buy it from cars shop you can spawn it only from owned vehicle spawner (Green Spawner)
-
What do you mean by "owned"? Green Spawner there can spawn your owned vehicle
-
Hi Guys Who Can Give Me Some Examples for make Owned Vehicle spawners ?
-
Great Job
-
Thanks You {Sloved}
-
i'm using NG Gamemode and their everything exports isClientLoggedin i'm trying to change login panel i was having much problems but now fixed there is function like that ? isClientLoggedin i searched in wiki i don't find it
-
Have you used fadeCamera? No
-
Hey Guys in my login panel the intro won't showing what is the problem ? That Code GUIEditor = { tab = {}, label = {}, tabpanel = {}, edit = {}, button = {}, window = {}, checkbox = {}, memo = {} } screenW, screenH = guiGetScreenSize() xtd, ytd = screenW/1366, screenH/768 addEventHandler("onClientRender", root, function () if getElementData(localPlayer, "Banned") then hideLoginWindow(true) end end) addEventHandler("onClientResourceStart", resourceRoot, function() screenW, screenH = guiGetScreenSize() GUIEditor.window[1] = guiCreateWindow((screenW - 626/1280*screenW) / 2, (screenH - 612/800*screenH) / 2, 626/1280*screenW, 612/800*screenH, "Welcome to SAEG:RPG!", false) guiWindowSetSizable(GUIEditor.window[1], false) guiWindowSetMovable(GUIEditor.window[1], false) guiSetAlpha(GUIEditor.window[1], 0) guiSetVisible(GUIEditor.window[1], false) GUIEditor.tabpanel[1] = guiCreateTabPanel(9/1280*screenW, 312/800*screenH, 607/1280*screenW, 290/800*screenH, false, GUIEditor.window[1]) GUIEditor.tab[1] = guiCreateTab("Updates", GUIEditor.tabpanel[1]) GUIEditor.tab[2] = guiCreateTab("Rules", GUIEditor.tabpanel[1]) GUIEditor.memo[1] = guiCreateMemo(10/1280*screenW, 10/800*screenH, 582/1280*screenW, 241/800*screenH, "", false, GUIEditor.tab[1]) guiMemoSetReadOnly(GUIEditor.memo[1], true) GUIEditor.memo[2] = guiCreateMemo(10/1280*screenW, 10/800*screenH, 582/1280*screenW, 241/800*screenH, "", false, GUIEditor.tab[2]) guiMemoSetReadOnly(GUIEditor.memo[2], true) local xml = xmlLoadFile("rules.xml") local messageNodes = xmlNodeGetChildren(xml) for i,node in ipairs(messageNodes) do guiSetText(GUIEditor.memo[2], guiGetText(GUIEditor.memo[2])..xmlNodeGetValue(node).."\n") end xmlUnloadFile(xml) local xml2 = xmlLoadFile("updates.xml") local messageNodes2 = xmlNodeGetChildren(xml2) for i2,node2 in ipairs(messageNodes2) do guiSetText(GUIEditor.memo[1], guiGetText(GUIEditor.memo[1])..xmlNodeGetValue(node2).."\n") end xmlUnloadFile(xml2) GUIEditor.button[1] = guiCreateButton(345/1280*screenW, 282/800*screenH, 124/1280*screenW, 45/800*screenH, "Login", false, GUIEditor.window[1]) function fock(k, s) if k == "enter" and s then triggerEvent("onClientGUIClick", GUIEditor.button[1]) end end addEventHandler("onClientKey", root, fock) GUIEditor.button[2] = guiCreateButton(479/1280*screenW, 282/800*screenH, 127/1280*screenW, 45/800*screenH, "Register", false, GUIEditor.window[1]) GUIEditor.label[1] = guiCreateLabel(11/1280*screenW, 30/800*screenH, 96/1280*screenW, 34/800*screenH, "Username:", false, GUIEditor.window[1]) GUIEditor.label[2] = guiCreateLabel(11/1280*screenW, 92/800*screenH, 96/1280*screenW, 34/800*screenH, "Password : ", false, GUIEditor.window[1]) GUIEditor.edit[1] = guiCreateEdit(125/1280*screenW, 26/800*screenH, 161/1280*screenW, 38/800*screenH, "", false, GUIEditor.window[1]) GUIEditor.edit[2] = guiCreateEdit(125/1280*screenW, 82/800*screenH, 161/1280*screenW, 38/800*screenH, "", false, GUIEditor.window[1]) guiEditSetMasked(GUIEditor.edit[2], true) GUIEditor.checkbox[1] = guiCreateCheckBox(52/1280*screenW, 157/800*screenH, 369/1280*screenW, 15/800*screenH, "I accept all server Rules.", true, false, GUIEditor.window[1]) guiSetFont(GUIEditor.checkbox[1], "default-bold-small") guiSetProperty(GUIEditor.checkbox[1], "NormalTextColour", "FF23FE00") GUIEditor.label[3] = guiCreateLabel(440/1280*screenW, 41/800*screenH, 176/1280*screenW, 89/800*screenH, "2015 @ SAEG RPG 1.0 BETA", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[3], "default-bold-small") guiLabelSetColor(GUIEditor.label[3], 255, 0, 0) guiLabelSetHorizontalAlign(GUIEditor.label[3], "left", true) GUIEditor.label[4] = guiCreateLabel(43/1280*screenW, 217/800*screenH, 546/1280*screenW, 47/800*screenH, "Always read the rules before playing!", false, GUIEditor.window[1]) GUIEditor.button[3] = guiCreateButton(211/1280*screenW, 282/800*screenH, 124/1280*screenW, 45/800*screenH, "Recover Account", false, GUIEditor.window[1]) end ) addEventHandler("onClientResourceStart", resourceRoot, function() local screenW, screenH = guiGetScreenSize() reg = guiCreateWindow((screenW - 690/1280*screenW) / 2, (screenH - 506/800*screenH) / 2, 690/1280*screenW, 506/800*screenH, "Register an account!", false) guiWindowSetSizable(reg, false) guiSetAlpha(reg, 1.00) register = guiCreateButton(228/1280*screenW, 447/800*screenH, 229/1280*screenW, 49/800*screenH, "Register", false, reg) guiSetProperty(register, "NormalTextColour", "FFFF0000") backBtn = guiCreateButton(22/1280*screenW, 27/800*screenH, 107/1280*screenW, 31/800*screenH, "Go back!", false, reg) editbox = guiCreateEdit(139/1280*screenW, 62/800*screenH, 526/1280*screenW, 37/800*screenH, "", false, reg) sLb1 = guiCreateLabel(32/1280*screenW, 68/800*screenH, 97/1280*screenW, 15/800*screenH, "Username:", false, reg) editbox1 = guiCreateEdit(139/1280*screenW, 136/800*screenH, 526/1280*screenW, 37/800*screenH, "", false, reg) guiEditSetMasked(editbox1, true) sLb2 = guiCreateLabel(36/1280*screenW, 146/800*screenH, 97/1280*screenW, 15/800*screenH, "Password:", false, reg) sLb3 = guiCreateLabel(36/1280*screenW, 229/800*screenH, 97/1280*screenW, 15/800*screenH, "Repeat Password:", false, reg) editbox2 = guiCreateEdit(139/1280*screenW, 217/800*screenH, 526/1280*screenW, 37/800*screenH, "", false, reg) guiEditSetMasked(editbox2, true) sAnswer = guiCreateEdit(139/1280*screenW, 296/800*screenH, 526/1280*screenW, 37/800*screenH, "", false, reg) sLb4 = guiCreateLabel(36/1280*screenW, 308/800*screenH, 97/1280*screenW, 15/800*screenH, "E-Mail:", false, reg) sLb5 = guiCreateLabel(37/1280*screenW, 351/800*screenH, 647/1280*screenW, 86/800*screenH, "Don't tell your password to anyone!", false, reg) end ) addEventHandler("onClientResourceStart", resourceRoot, function() local screenW, screenH = guiGetScreenSize() registerWindow = guiCreateWindow((screenW - 516/1280*screenW) / 2, (screenH - 461/800*screenH) / 2, 516/1280*screenW, 461/800*screenH, "Recover account", false) guiWindowSetSizable(registerWindow, false) guiSetVisible(registerWindow, false) guiSetAlpha(registerWindow, 0.-- s8) --> usernameR = guiCreateEdit(156/1280*screenW, 51/800*screenH, 208/1280*screenW, 37/800*screenH, "", false, registerWindow) myLabelS = guiCreateLabel(44/1280*screenW, 64/800*screenH, 112/1280*screenW, 34/800*screenH, "Acc username:", false, registerWindow) guiSetFont(myLabelS, "default-bold-small") secretAnswerR = guiCreateEdit(156/1280*screenW, 113/800*screenH, 208/1280*screenW, 37/800*screenH, "", false, registerWindow) myLabel2 = guiCreateLabel(44/1280*screenW, 126/800*screenH, 112/1280*screenW, 34/800*screenH, "E-Mail:", false, registerWindow) guiSetFont(myLabel2, "default-bold-small") goBack = guiCreateButton(23/1280*screenW, 37/800*screenH, 73/1280*screenW, 24/800*screenH, "Back", false, registerWindow) submitR = guiCreateButton(113/1280*screenW, 390/800*screenH, 272/1280*screenW, 49/800*screenH, "Recover", false, registerWindow) myLabel1 = guiCreateLabel(18/1280*screenW, 199/800*screenH, 488/1280*screenW, 163/800*screenH, "We are not able to do anything if you lost your e-mail or username. ", false, registerWindow) end ) function setWarningText(text, r, g, b) if not text or not r or not g or not b then return end guiSetText(GUIEditor.label[4], tostring(text)) guiLabelSetColor(GUIEditor.label[4], r, g, b) end addEvent('setWarning', true) addEventHandler('setWarning', root, setWarningText) function setRegisterWarningText(text, r, g, b) if not text or not r or not g or not b then return end guiSetText(sLb5, tostring(text)) guiLabelSetColor(sLb5, r, g, b) end addEvent('setRegisterWarning', true) addEventHandler('setRegisterWarning', root, setRegisterWarningText) function windowHandler( ) local playername = getPlayerName(localPlayer) guiSetText(GUIEditor.edit[1], "") guiSetText(GUIEditor.edit[2], "") setWarningText("Always read the rules before playing!", 0, 255, 0) setRegisterWarningText("Don't tell your password to anyone!", 0, 255, 0) guiSetVisible ( GUIEditor.window[1], false ) guiSetVisible ( reg, false ) guiSetInputEnabled( false ) showCursor ( false ) end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), windowHandler ) function playerPressedKey(s) elements = { GUIEditor.edit[1], GUIEditor.edit[2], sAnswer, editbox, editbox1, editbox2, secretAnswerR, usernameR, } triggers = { "isValidUsername", "isValidPassword", "isValidSecretAnswer", "isValidUsername", "isValidPassword", "isValidPassword", "isValidSecretAnswer", "isValidUsername", } parents = { "setWarning", "setWarning", "setRecoverText", "setRegisterWarning", "setRegisterWarning", "setRegisterWarning", "setRecoverText", "setRecoverText" } for k,v in ipairs(elements) do if v == s then if elements[k] == elements[4] then triggerServerEvent("isValidR", localPlayer, guiGetText(s), parents[k]) else triggerServerEvent(triggers[k], localPlayer, guiGetText(s), parents[k]) end end end end addEventHandler("onClientGUIChanged", guiRoot, playerPressedKey) function resetFields() guiSetText(sAnswer, "") guiSetText(editbox2, "") guiSetText(editbox, "") guiSetText(usernameR, "") guiSetText(GUIEditor.edit[1], "") guiSetText(GUIEditor.edit[2], "") guiSetText(secretAnswerR, "") guiSetText(editbox1, "") end addEvent('resetFields', true) addEventHandler('resetFields', root,resetFields ) function login () if (source == GUIEditor.button[1]) then if guiCheckBoxGetSelected( GUIEditor.checkbox[1] ) == true then triggerServerEvent ( "onLogin",getRootElement(), localPlayer, guiGetText(GUIEditor.edit[1]), guiGetText(GUIEditor.edit[2]) ) removeEventHandler("onClientKey", root, fock) else triggerServerEvent("kickPlayer", localPlayer) end end end addEventHandler ( "onClientGUIClick", guiRoot, login ) function setRecoverText(text, r, g, b) guiLabelSetColor(myLabel1, r, g, b) guiSetText(myLabel1, tostring(text)) end addEvent("setRecoverText", true) addEventHandler("setRecoverText", root, setRecoverText) function recover(button, state) if (button == "left" and state == "up") then if source == goBack then guiSetVisible( registerWindow, false ) guiSetVisible( GUIEditor.window[1], true ) resetFields() elseif source == submitR then local acc = guiGetText(usernameR) local secret = guiGetText(secretAnswerR) if secret == "" then setRecoverText("Please type something at editbox of e-mail.", 255, 0, 0) return elseif acc == "" then setRecoverText("No account entered! Sorry!", 255, 0, 0) return end triggerServerEvent("recoverAccount", localPlayer, localPlayer, acc, secret) end
