Ace_Gambit Posted September 4, 2008 Share Posted September 4, 2008 What exactly isn't working? I can't find any syntax errors so be more specific. Link to comment
Michael_Sund Posted September 4, 2008 Author Share Posted September 4, 2008 What exactly isn't working? I can't find any syntax errors so be more specific. I don't get any errors but it doesn't do anything nothing happens is this serversided or clientside?? maybe that's the problem? Link to comment
Michael_Sund Posted September 4, 2008 Author Share Posted September 4, 2008 oh i found the problem!!! addCommandHandler("[b]/[/b]adminad", admAd ) EDIT it works now but one problem with that is if i use spaces in the message it will only show the first word Link to comment
Ace_Gambit Posted September 4, 2008 Share Posted September 4, 2008 That's because every word is parsed as a single parameter lol. function admAd (player, commandName, ... ) local admtext = "" for _, parameter in ipairs(arg) do admtext = admtext .. parameter .. " " end outputChatBox ( "Server Security:" .. admtext .. ".", getRootElement(), 255, 0, 0, true ) end Link to comment
Michael_Sund Posted September 4, 2008 Author Share Posted September 4, 2008 That's because every word is parsed as a single parameter lol. function admAd (player, commandName, ... ) local admtext = "" for _, parameter in ipairs(arg) do admtext = admtext .. parameter .. " " end outputChatBox ( "Server Security:" .. admtext .. ".", getRootElement(), 255, 0, 0, true ) end h, thx this works if i would just put it in the script now? hope so cuz i'll try Link to comment
Michael_Sund Posted September 4, 2008 Author Share Posted September 4, 2008 Yaay it worked love you man <3<3<3 EDIT: Holy shiit 8 pages that's hypercool ^^ Link to comment
Michael_Sund Posted September 4, 2008 Author Share Posted September 4, 2008 Ok now i'll build a prison but i have to make an jailscript to jail players but how should i make them be autoreleased? Ok this is exactly how i want it: /jail [player] [time] (or any easier way to jail them like press a button and then the closest player will be jailed) /unjail [player] And they should be auto released if i don't unjail them Link to comment
Scarface Posted September 4, 2008 Share Posted September 4, 2008 That's because every word is parsed as a single parameter lol. function admAd (player, commandName, ... ) local admtext = "" for _, parameter in ipairs(arg) do admtext = admtext .. parameter .. " " end outputChatBox ( "Server Security:" .. admtext .. ".", getRootElement(), 255, 0, 0, true ) end h, thx this works if i would just put it in the script now? hope so cuz i'll try ok so what does it do? Ok now i'll build a prison but i have to make an jailscript to jail players but how should i make them be autoreleased?Ok this is exactly how i want it: /jail [player] [time] (or any easier way to jail them like press a button and then the closest player will be jailed) /unjail [player] And they should be auto released if i don't unjail them just code it the way you want: function Arrest ( attacker, weapon, bodypart ) if isElement(attacker) and getElementType(attacker) == "player" then outputChatBox("1") if ( weapon == 3 and getPlayerSkin ( attacker ) >= 280 ) then outputChatBox("2") if ( getPlayerWantedLevel ( source ) > 0 ) then outputChatBox("3") setPlayerWantedLevel ( source, 0 ) setElementPosition ( source, -1982.1209, 130.7857, 27.6875 ) outputChatBox ( "You have been arrested.", source, 255, 0, 0 ) toggleAllControls ( source, true ) end end end setTimer ( DisableControls, 30000, 1, source ) end addEventHandler ( "onPlayerDamage", getRootElement (), Arrest ) function DisableControls (thePlayer) toggleAllControls ( thePlayer, false ) end Link to comment
Michael_Sund Posted September 4, 2008 Author Share Posted September 4, 2008 OK, BIG NEWS i got a forum: mrp.net78.net i will try to make it to mtamrp.co.cc but i don't know if i'll get it to work, i believe so Link to comment
50p Posted September 5, 2008 Share Posted September 5, 2008 That's because every word is parsed as a single parameter lol. function admAd (player, commandName, ... ) local admtext = "" for _, parameter in ipairs(arg) do admtext = admtext .. parameter .. " " end outputChatBox ( "Server Security:" .. admtext .. ".", getRootElement(), 255, 0, 0, true ) end Or you can use table.concat to make a string out of table. function admAd (player, commandName, ... ) local admtext = table.concat( arg, " " ) outputChatBox ( "Server Security:" .. admtext .. ".", getRootElement(), 255, 0, 0, true ) end Link to comment
Michael_Sund Posted September 5, 2008 Author Share Posted September 5, 2008 Ok, i need new admins!! if you want the job, go to http://www.mtamrp.co.cc and register and then post an application with your ingame name and other important stuff i would want to know, as i don't have a real app form... So just post an application about the admin place on the forum if you get accepted you will be moderator on forum and admin on the server.. Link to comment
Gamesnert Posted September 5, 2008 Share Posted September 5, 2008 Ok, i need new admins!! if you want the job, go to http://www.mtamrp.co.cc and register and then post an application with your ingame name and other important stuff i would want to know, as i don't have a real app form...So just post an application about the admin place on the forum if you get accepted you will be moderator on forum and admin on the server.. I'm a bit busy unfortunately. Spore time, you know. I might help here, but less often then normally. Link to comment
Michael_Sund Posted September 5, 2008 Author Share Posted September 5, 2008 Ok, i need new admins!! if you want the job, go to http://www.mtamrp.co.cc and register and then post an application with your ingame name and other important stuff i would want to know, as i don't have a real app form...So just post an application about the admin place on the forum if you get accepted you will be moderator on forum and admin on the server.. I'm a bit busy unfortunately. Spore time, you know. I might help here, but less often then normally. Ok if you wanna be admin or/and moderator then you can register here and then click on the menu button/link called "Apply for a job" at the right top corner. Link to comment
Scarface Posted September 6, 2008 Share Posted September 6, 2008 Ok, i need new admins!! if you want the job, go to http://www.mtamrp.co.cc and register and then post an application with your ingame name and other important stuff i would want to know, as i don't have a real app form...So just post an application about the admin place on the forum if you get accepted you will be moderator on forum and admin on the server.. I'm a bit busy unfortunately. Spore time, you know. I might help here, but less often then normally. me too Link to comment
SpZ Posted September 17, 2008 Share Posted September 17, 2008 http://safebrowsing.clients.google.com/ ... host.info/ Google warned me your site contains malicious software Link to comment
Scarface Posted September 17, 2008 Share Posted September 17, 2008 http://safebrowsing.clients.google.com/safebrowsing/diagnostic?site=http://www.michael_sund.comphost.info/Google warned me your site contains malicious software Link to comment
Michael_Sund Posted September 17, 2008 Author Share Posted September 17, 2008 wtf that's the host which is hosting my old forum, but i don't have a forum anymore i have changed hosts many times now... Link to comment
Michael_Sund Posted September 19, 2008 Author Share Posted September 19, 2008 Ok, I am uploading the script as resource now so everyone who have supported me will be in the credits!! But of course i still need your help for more scripting Link to comment
Michael_Sund Posted September 19, 2008 Author Share Posted September 19, 2008 OMG i screwed it up now i have to edit the files for uploading again, and my long nice description was wiped again!! wtf i'm sooo stupid i hate myself... I'll just upload it on a website instead and send links here if someone requests it -.-' Link to comment
Scarface Posted September 19, 2008 Share Posted September 19, 2008 wtf i'm sooo stupid Very true i hate myself Dont worry i do too Link to comment
Ace_Gambit Posted September 19, 2008 Share Posted September 19, 2008 Hurry up already. I want to see the results. Link to comment
Gamesnert Posted September 19, 2008 Share Posted September 19, 2008 Hmmm... Yes I want to see it too. Give us!!!! Link to comment
Michael_Sund Posted September 19, 2008 Author Share Posted September 19, 2008 Hmmm... Yes I want to see it too. Give us!!!! LOL sry, wait i gotta upload it but if io have to hurry i will not get all credits in Link to comment
Gamesnert Posted September 19, 2008 Share Posted September 19, 2008 Hmmm... Yes I want to see it too. Give us!!!! LOL sry, wait i gotta upload it but if io have to hurry i will not get all credits in Oh lol who cares... As long as I am in it! Link to comment
Michael_Sund Posted September 19, 2008 Author Share Posted September 19, 2008 (edited) Ignore this Edited September 21, 2008 by Guest 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