Jump to content

RP Game Mode Help/Progress topic "RPG Server (ALPHA STAGE)"


Recommended Posts

  • Replies 142
  • Created
  • Last Reply

Top Posters In This Topic

Posted
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 :S nothing happens :o is this serversided or clientside?? maybe that's the problem?

Posted

oh i found the problem!!!

addCommandHandler("[b]/[/b]adminad", admAd ) 

xD

EDIT it works now but one problem with that is if i use spaces in the message it will only show the first word :o

Posted

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 
  

Posted
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? :D hope so cuz i'll try :D

Posted

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 :P

Posted
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? :D hope so cuz i'll try :D

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 :P

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 

Posted
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 
  

Posted

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..

Posted
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. :P

I might help here, but less often then normally. ;)

Posted
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. :P

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.

Posted
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. :P

I might help here, but less often then normally. ;)

me too :wink:

  • 2 weeks later...
Posted

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 -.-'

Posted
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 :D

Oh lol who cares... As long as I am in it! :D

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...