#,Dr.To[sh]iBa Posted April 17, 2018 Share Posted April 17, 2018 الحين ابي اضيف سريالين او اكثر هنا 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; ['car'] = 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; ['warp'] = 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; ['ss'] = true; ['wt'] = true; ['warpto'] = true; ['sp'] = true; ['setpos'] = true; ['st'] = true; ['sw'] = true; } addEventHandler ( 'onPlayerCommand',getRootElement ( ), function ( cmd ) if Command [ cmd ] then if getPlayerSerial ( source ) ~= "F651D3AB7E5D5A074715EF69E4EBBF44" then cancelEvent ( ); outputChatBox ( "غير مصرح لك",source,250, 0, 0, false ) end end end ); Link to comment
MA[S]RIY Posted April 17, 2018 Share Posted April 17, 2018 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; ['car'] = 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; ['warp'] = 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; ['ss'] = true; ['wt'] = true; ['warpto'] = true; ['sp'] = true; ['setpos'] = true; ['st'] = true; ['sw'] = true;}addEventHandler ( 'onPlayerCommand',getRootElement ( ), function ( cmd ) if Command [ cmd ] then if getPlayerSerial ( source ) ~= "F651D3AB7E5D5A074715EF69E4EBBF44" or "السريال الثاني" then cancelEvent ( ); outputChatBox ( "غير مصرح لك",source,250, 0, 0, false ) end endend); .. Link to comment
#,Dr.To[sh]iBa Posted April 17, 2018 Author Share Posted April 17, 2018 والله جربت كذا لكن ما اشتغل 12 minutes ago, MARIY said: 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; ['car'] = 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; ['warp'] = 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; ['ss'] = true; ['wt'] = true; ['warpto'] = true; ['sp'] = true; ['setpos'] = true; ['st'] = true; ['sw'] = true;}addEventHandler ( 'onPlayerCommand',getRootElement ( ), function ( cmd ) if Command [ cmd ] then if getPlayerSerial ( source ) ~= "F651D3AB7E5D5A074715EF69E4EBBF44" or "السريال الثاني" then cancelEvent ( ); outputChatBox ( "غير مصرح لك",source,250, 0, 0, false ) end endend); .. Link to comment
Master_MTA Posted April 17, 2018 Share Posted April 17, 2018 24 minutes ago, abulghar said: والله جربت كذا لكن ما اشتغل local serials={ ['ser1']=true, ['ser2']=true, ['ser3']=true, ['ser4']=true, } 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; ['car'] = 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; ['warp'] = 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; ['ss'] = true; ['wt'] = true; ['warpto'] = true; ['sp'] = true; ['setpos'] = true; ['st'] = true; ['sw'] = true; } addEventHandler ( 'onPlayerCommand',getRootElement ( ), function ( cmd ) if Command [ cmd ] then if serials[ getPlayerSerial ( source ) ] then cancelEvent ( ); outputChatBox ( "غير مصرح لك",source,250, 0, 0, false ) end end end ); Link to comment
Rakan# Posted April 17, 2018 Share Posted April 17, 2018 @MARIY في تحقق اللي انت مسويه if getPlayerSerial() ~= "1" or "2" then -- ذا خطا if getPlayerSerial() ~= "1" or getPlayerSerial() ~= "2" then -- ذا خطا برضو if getPlayerSerial() ~= "1" and getPlayerSerial() ~= "2" then -- ذا الصحيح -- لان ماينفع تقول اذا كان مايساوي كذا او مايساوي كذا -- تقول لو مايساوي كذا ومايساوي كذا لان لو استعملت او بيطلع انه صحيح كانك تبي للاعب سيريالين -- "or" تستعملها مع التحقق يساوي == اتمنى فهمت وموفق 16 minutes ago, Master_MTA said: local serials={ ['ser1']=true, ['ser2']=true, ['ser3']=true, ['ser4']=true, } 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; ['car'] = 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; ['warp'] = 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; ['ss'] = true; ['wt'] = true; ['warpto'] = true; ['sp'] = true; ['setpos'] = true; ['st'] = true; ['sw'] = true; } addEventHandler ( 'onPlayerCommand',getRootElement ( ), function ( cmd ) if Command [ cmd ] then if serials[ getPlayerSerial ( source ) ] then cancelEvent ( ); outputChatBox ( "غير مصرح لك",source,250, 0, 0, false ) end end end ); تصحيح بسيط local serials={ ['ser1']=true, ['ser2']=true, ['ser3']=true, ['ser4']=true, } 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; ['car'] = 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; ['warp'] = 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; ['ss'] = true; ['wt'] = true; ['warpto'] = true; ['sp'] = true; ['setpos'] = true; ['st'] = true; ['sw'] = true; } addEventHandler ( 'onPlayerCommand',getRootElement ( ), function ( cmd ) if Command [ cmd ] then if not serials[ getPlayerSerial ( source ) ] then cancelEvent ( ); outputChatBox ( "غير مصرح لك",source,250, 0, 0, false ) end end end ); 1 Link to comment
Master_MTA Posted April 18, 2018 Share Posted April 18, 2018 1 hour ago, Rakan# said: تصحيح بسيط ما يحتاج تصحيح هو يبيه زي ما انا كاتبه راجع كوده الاصلي Link to comment
#,Dr.To[sh]iBa Posted April 18, 2018 Author Share Posted April 18, 2018 9 hours ago, Rakan# said: if getPlayerSerial() ~= "1" or "2" then -- ذا خطا if getPlayerSerial() ~= "1" or getPlayerSerial() ~= "2" then -- ذا خطا برضو if getPlayerSerial() ~= "1" and getPlayerSerial() ~= "2" then -- ذا الصحيح -- لان ماينفع تقول اذا كان مايساوي كذا او مايساوي كذا -- تقول لو مايساوي كذا ومايساوي كذا لان لو استعملت او بيطلع انه صحيح كانك تبي للاعب سيريالين -- "or" تستعملها مع التحقق يساوي == يعطيكم العافيه علي المساعدة انا استخدمت ذي الطريقة 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