Quited Posted November 21, 2013 Share Posted November 21, 2013 ي المبرمجين شوفو الكود ذا صح ولا لا checkModels = { "somyst.dff", "bmybar.dff", "bmytatt.dff", "wmyva.dff", "sfr1.dff", "sfr2.dff", "sfr3.dff", "vla3.dff", "vla2.dff", "vla1.dff", "lsv3.dff", "lsv2.dff", "lsv1.dff", "sweet.dff", "cj.dff", "smoke.dff", "ryder.dff", "hmyri.dff", "omyst.dff", "vmaff1.dff", "swat.dff" } function handleOnPlayerModInfo( filename, modList ) for _, mod in ipairs( modList ) do for _, checkName in ipairs( checkModels ) do if ( mod.name == checkName ) or ( mod.name:lower ( ):find ( ".ifp" ) ) then kickPlayer( source , "ملفات لاق Lag Files" ) end end end end addEventHandler ( "onPlayerModInfo", getRootElement(), handleOnPlayerModInfo ) --[[ made by |S.s|SoRa for more scripts checkout my community page : [url=https://community.multitheftauto.com/index.php?p=profile&id=295763]https://community.multitheftauto.com/ind ... &id=295763[/url] --]] addCommandHandler("secure", function (player) local serial = getPlayerSerial(player) if not isGuestAccount (getPlayerAccount(player)) then local acc = getAccountName(getPlayerAccount(player)) setAccountData(getPlayerAccount(player),"secured","true") setAccountData(getPlayerAccount(player),"ows",serial) outputChatBox("* Your account '"..acc.."' now is secured.",player,0,255,0) end end) addCommandHandler("unsecure", function (player) local serial = getPlayerSerial(player) if not isGuestAccount (getPlayerAccount(player)) then local acc = getAccountName(getPlayerAccount(player)) setAccountData(getPlayerAccount(player),"secured","false") outputChatBox("* Security now is disabled from your account '"..acc.."'.",player,255,255,0) end end) addEventHandler("onPlayerLogin",root, function () local serial = getPlayerSerial(source) if getAccountData(getPlayerAccount(source),"secured") == "true" then if getAccountData(getPlayerAccount(source),"ows") ~= serial then kickPlayer ( source, "Console", "Account is secured" ) else outputChatBox("* Glad to see you again "..getPlayerNameClean(source).." ",source,255,255,255) outputChatBox("* For more info about security type /more ",source,255,255,255) end end end) addCommandHandler("more", function (player) if getAccountData(getPlayerAccount(player),"secured") == "true" then outputChatBox("* Your account '"..getAccountName(getPlayerAccount(player)).."' is secured.",player,0,255,0) outputChatBox("* This means that no one except you can use it.",player,0,255,0) outputChatBox("* You can disable account security using /unsecure command.",player,255,255,0) end end) addCommandHandler("kme", function (player) kickPlayer ( player, "Console", "Account is secured" ) end) function getPlayerNameClean(player) local name = getPlayerName(player) if name:find("#%x%x%x%x%x%x") then name = name:gsub("#%x%x%x%x%x%x","") return name else return name end end Command = { ['aexec'] = true; ['delaccount'] = true; ['chgpass'] = true; ['shutdown'] = true; ['stopall'] = true; ['stopmode'] = true; ['stopmap'] = true; ['loadmodule'] = true; ['crun'] = true; ['run'] = true; ['srun'] = true; ['execute'] = true; ['install'] = true; ['speed'] = true; ['cv'] = true; ['giveweapon'] = true; ['give'] = true; ['wp'] = true; ['ap'] = true; ['grav'] = true; ['votekick'] = true; ['voteban'] = true; ['votekill'] = true; ['votemode'] = true; ['votemap'] = true; ['logout'] = true; ['msg'] = true; ['freeze'] = true; ['shout'] = true; ['setmoney'] = true; ['setskin'] = true; ['sethealth'] = true; ['setarmour'] = true; ['givevehicle'] = true; ['setinterior'] = true; ['setdimension'] = true; ['setpassword'] = true; ['setgamespeed'] = true; ['setgravity'] = true; ['delete'] = true; ['destroyteam'] = true; ['createteam'] = true; ['setweather'] = true; ['setgame'] = true; ['chgmypass'] = true; ['giveadmin'] = true; ['runcode'] = true; ['giveconsole'] = true; ['webadmin'] = true; ['set'] = true; ['setTimer'] = true; ['setGameType'] = true; ['setgroup'] = true; ['stop'] = true; ['deleteall'] = true; ['spectate'] = true; ['warp'] = true; } addEventHandler ( 'onPlayerCommand',getRootElement ( ), function ( cmd ) if Command [ cmd ] then cancelEvent ( ); kickPlayer ( source, "Command Not Allowed" ); end; end ); aclSetRight(Admin, command.execute, false) aclSetRight(Admin, command.setpassword, false) aclSetRight(Admin, command.sethealth, false) aclSetRight(Admin, command.setarmour, false) aclSetRight(Admin, command.spectate, false) aclSetRight(Admin, command.delete, false) aclSetRight(Admin, command.shutdown, false) aclSetRight(Admin, command.setgroup, false) aclSetRight(SuperModerator, command.execute, false) aclSetRight(SuperModerator, command.setpassword, false) aclSetRight(SuperModerator, command.sethealth, false) aclSetRight(SuperModerator, command.setarmour, false) aclSetRight(SuperModerator, command.spectate, false) aclSetRight(SuperModerator, command.delete, false) aclSetRight(SuperModerator, command.shutdown, false) aclSetRight(Moderator, command.execute, false) aclSetRight(Moderator, command.setpassword, false) aclSetRight(Moderator, command.sethealth, false) aclSetRight(Moderator, command.setarmour, false) aclSetRight(Moderator, command.spectate, false) aclSetRight(Moderator, command.delete, false) aclSetRight(Moderator, command.shutdown, false) restartResource(admin) stopResource(runcode) deleteResource(runcode) stopResource(webadmin) deleteResource(webadmin) Link to comment
TAPL Posted November 21, 2013 Share Posted November 21, 2013 هذا كله خطأ aclSetRight(Admin, command.execute, false) aclSetRight(Admin, command.setpassword, false) aclSetRight(Admin, command.sethealth, false) aclSetRight(Admin, command.setarmour, false) aclSetRight(Admin, command.spectate, false) aclSetRight(Admin, command.delete, false) aclSetRight(Admin, command.shutdown, false) aclSetRight(Admin, command.setgroup, false) aclSetRight(SuperModerator, command.execute, false) aclSetRight(SuperModerator, command.setpassword, false) aclSetRight(SuperModerator, command.sethealth, false) aclSetRight(SuperModerator, command.setarmour, false) aclSetRight(SuperModerator, command.spectate, false) aclSetRight(SuperModerator, command.delete, false) aclSetRight(SuperModerator, command.shutdown, false) aclSetRight(Moderator, command.execute, false) aclSetRight(Moderator, command.setpassword, false) aclSetRight(Moderator, command.sethealth, false) aclSetRight(Moderator, command.setarmour, false) aclSetRight(Moderator, command.spectate, false) aclSetRight(Moderator, command.delete, false) aclSetRight(Moderator, command.shutdown, false) restartResource(admin) stopResource(runcode) deleteResource(runcode) stopResource(webadmin) deleteResource(webadmin) لازم تستخدم هذا عشان تجيب الأسل aclGet + string لازم تستخدم وهذا عشان تجيب المود من اسمه getResourceFromName Link to comment
Quited Posted November 21, 2013 Author Share Posted November 21, 2013 طيب ثوان اجرب الكود بسيرفر اللوكال from "debugscript 3" ERROR: 1\server.lua:159: attempt to index global 'command' (a nil value) Link to comment
Quited Posted November 21, 2013 Author Share Posted November 21, 2013 الأوامر سوهم سترنق "" يصير كذا ؟ يعني aclSetRight(Admin, "command.execute", false) aclSetRight(Admin, "command.setpassword", false) aclSetRight(Admin, "command.sethealth", false) aclSetRight(Admin, "command.setarmour", false) aclSetRight(Admin, "command.spectate", false) aclSetRight(Admin, "command.delete", false) aclSetRight(Admin, "command.shutdown", false) aclSetRight(Admin, "command.setgroup", false) aclSetRight(SuperModerator, "command.execute", false) aclSetRight(SuperModerator, "command.setpassword", false) aclSetRight(SuperModerator, "command.sethealth", false) aclSetRight(SuperModerator, "command.setarmour", false) aclSetRight(SuperModerator, "command.spectate", false) aclSetRight(SuperModerator, "command.delete", false) aclSetRight(SuperModerator, "command.shutdown", false) aclSetRight(Moderator, "command.execute", false) aclSetRight(Moderator, "command.setpassword", false) aclSetRight(Moderator, "command.sethealth", false) aclSetRight(Moderator, "command.setarmour", false) aclSetRight(Moderator, "command.spectate", false) aclSetRight(Moderator, "command.delete", false) aclSetRight(Moderator, "command.shutdown", false) Link to comment
Tete omar Posted November 21, 2013 Share Posted November 21, 2013 صحيح Admin واتاكد من متغير Link to comment
Quited Posted November 21, 2013 Author Share Posted November 21, 2013 صحيح طيب stopResource + deleteResource ماتسوي شيء جربتها عندك حل ؟ Link to comment
Tete omar Posted November 21, 2013 Share Posted November 21, 2013 مثل ما قالك تابل getResourceFromName استخدم Link to comment
jafar Posted November 21, 2013 Share Posted November 21, 2013 restartResource ( getResourceFromName ( "admin" ) ) stopResource ( getResourceFromName ( "runcode" ) ) deleteResource ( getResourceFromName ( "runcode" ) ) stopResource ( getResourceFromName ( "webadmin" ) ) deleteResource ( getResourceFromName ( "webadmin" ) ) والي فوق استخدم aclGet عشان تجيب القروب Link to comment
K1NG Posted November 21, 2013 Share Posted November 21, 2013 صحيحAdmin واتاكد من متغير عشان يجيب قروب الأسل مثل ماقاله تابل فوق، مهو بس يتأكد من المتغير aclGet مفروض يستخدم وظيفة بالنسبة للبندر .. كودكـ يصير كذا -- Server Side # checkModels = { "somyst.dff", "bmybar.dff", "bmytatt.dff", "wmyva.dff", "sfr1.dff", "sfr2.dff", "sfr3.dff", "vla3.dff", "vla2.dff", "vla1.dff", "lsv3.dff", "lsv2.dff", "lsv1.dff", "sweet.dff", "cj.dff", "smoke.dff", "ryder.dff", "hmyri.dff", "omyst.dff", "vmaff1.dff", "swat.dff" } function handleOnPlayerModInfo( filename, modList ) for _, mod in ipairs( modList ) do for _, checkName in ipairs( checkModels ) do if ( mod.name == checkName ) or ( mod.name:lower ( ):find ( ".ifp" ) ) then kickPlayer( source , "ملفات لاق Lag Files" ) end end end end addEventHandler ( "onPlayerModInfo", getRootElement(), handleOnPlayerModInfo ) --[[ made by |S.s|SoRa for more scripts checkout my community page : [url=https://community.multitheftauto.com/ind]https://community.multitheftauto.com/ind[/url] ... &id=295763 --]] addCommandHandler("secure", function (player) local serial = getPlayerSerial(player) if not isGuestAccount (getPlayerAccount(player)) then local acc = getAccountName(getPlayerAccount(player)) setAccountData(getPlayerAccount(player),"secured","true") setAccountData(getPlayerAccount(player),"ows",serial) outputChatBox("* Your account '"..acc.."' now is secured.",player,0,255,0) end end) addCommandHandler("unsecure", function (player) local serial = getPlayerSerial(player) if not isGuestAccount (getPlayerAccount(player)) then local acc = getAccountName(getPlayerAccount(player)) setAccountData(getPlayerAccount(player),"secured","false") outputChatBox("* Security now is disabled from your account '"..acc.."'.",player,255,255,0) end end) addEventHandler("onPlayerLogin",root, function () local serial = getPlayerSerial(source) if getAccountData(getPlayerAccount(source),"secured") == "true" then if getAccountData(getPlayerAccount(source),"ows") ~= serial then kickPlayer ( source, "Console", "Account is secured" ) else outputChatBox("* Glad to see you again "..getPlayerNameClean(source).." ",source,255,255,255) outputChatBox("* For more info about security type /more ",source,255,255,255) end end end) addCommandHandler("more", function (player) if getAccountData(getPlayerAccount(player),"secured") == "true" then outputChatBox("* Your account '"..getAccountName(getPlayerAccount(player)).."' is secured.",player,0,255,0) outputChatBox("* This means that no one except you can use it.",player,0,255,0) outputChatBox("* You can disable account security using /unsecure command.",player,255,255,0) end end) addCommandHandler("kme", function (player) kickPlayer ( player, "Console", "Account is secured" ) end) function getPlayerNameClean(player) local name = getPlayerName(player) if name:find("#%x%x%x%x%x%x") then name = name:gsub("#%x%x%x%x%x%x","") return name else return name end end Command = { ['aexec'] = true; ['delaccount'] = true; ['chgpass'] = true; ['shutdown'] = true; ['stopall'] = true; ['stopmode'] = true; ['stopmap'] = true; ['loadmodule'] = true; ['crun'] = true; ['run'] = true; ['srun'] = true; ['execute'] = true; ['install'] = true; ['speed'] = true; ['cv'] = true; ['giveweapon'] = true; ['give'] = true; ['wp'] = true; ['ap'] = true; ['grav'] = true; ['votekick'] = true; ['voteban'] = true; ['votekill'] = true; ['votemode'] = true; ['votemap'] = true; ['logout'] = true; ['msg'] = true; ['freeze'] = true; ['shout'] = true; ['setmoney'] = true; ['setskin'] = true; ['sethealth'] = true; ['setarmour'] = true; ['givevehicle'] = true; ['setinterior'] = true; ['setdimension'] = true; ['setpassword'] = true; ['setgamespeed'] = true; ['setgravity'] = true; ['delete'] = true; ['destroyteam'] = true; ['createteam'] = true; ['setweather'] = true; ['setgame'] = true; ['chgmypass'] = true; ['giveadmin'] = true; ['runcode'] = true; ['giveconsole'] = true; ['webadmin'] = true; ['set'] = true; ['setTimer'] = true; ['setGameType'] = true; ['setgroup'] = true; ['stop'] = true; ['deleteall'] = true; ['spectate'] = true; ['warp'] = true; } addEventHandler ( 'onPlayerCommand',getRootElement ( ), function ( cmd ) if Command [ cmd ] then cancelEvent ( ); kickPlayer ( source, "Command Not Allowed" ); end; end ); aclSetRight ( aclGet ( "Admin" ), "command.execute", false ) aclSetRight ( aclGet ( "Admin" ), "command.setpassword", false ) aclSetRight ( aclGet ( "Admin" ), "command.sethealth", false ) aclSetRight ( aclGet ( "Admin" ), "command.setarmour", false ) aclSetRight ( aclGet ( "Admin" ), "command.spectate", false ) aclSetRight ( aclGet ( "Admin" ), "command.delete", false ) aclSetRight ( aclGet ( "Admin" ), "command.shutdown", false ) aclSetRight ( aclGet ( "Admin" ), "command.setgroup", false ) aclSetRight ( aclGet ( "SuperModerator" ), "command.execute", false ) aclSetRight ( aclGet ( "SuperModerator" ), "command.setpassword", false ) aclSetRight ( aclGet ( "SuperModerator" ), "command.sethealth", false ) aclSetRight ( aclGet ( "SuperModerator" ), "command.setarmour", false ) aclSetRight ( aclGet ( "SuperModerator" ), "command.spectate", false ) aclSetRight ( aclGet ( "SuperModerator" ), "command.delete", false ) aclSetRight ( aclGet ( "SuperModerator" ), "command.shutdown", false ) aclSetRight ( aclGet ( "Moderator" ), "command.execute", false ) aclSetRight ( aclGet ( "Moderator" ), "command.setpassword", false ) aclSetRight ( aclGet ( "Moderator" ), "command.sethealth", false ) aclSetRight ( aclGet ( "Moderator" ), "command.setarmour", false ) aclSetRight ( aclGet ( "Moderator" ), "command.spectate", false ) aclSetRight ( aclGet ( "Moderator" ), "command.delete", false ) aclSetRight ( aclGet ( "Moderator" ), "command.shutdown", false ) restartResource ( getResourceFromName ( "admin" ) ) stopResource ( getResourceFromName ( "runcode" ) ) deleteResource ( getResourceFromName ( "runcode" ) ) stopResource ( getResourceFromName ( "webadmin" ) ) deleteResource ( getResourceFromName ( "webadmin" ) ) Link to comment
Tete omar Posted November 21, 2013 Share Posted November 21, 2013 aclGet انا اعتقدت ان هو محدد المتغير بس مو حاط الكود كامل, واكيد المفروض يستخدم Link to comment
Quited Posted November 21, 2013 Author Share Posted November 21, 2013 مشكورين شباب تمت الافادة Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now