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

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

Link to comment

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

Link to comment
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 

Link to comment
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
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. ;)

Link to comment
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.

Link to comment
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:

Link to comment
  • 2 weeks later...

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