Jump to content

Simple Kill Script


Recommended Posts

Posted

Hey there! I'm new to this forum and since this is my first post, I'll introduce myself.

I am and intermediate C++, GML (Game Maker), VBScript, and JavaScript programmer.

I know very little of Java and Javascript, and have never had any experience with Lua.

My question is, I want to make a simple kill script (that only works for the Admin, Mods, etc) that kills anyone; but, if a Mod tries to kill an Admin, it shows them a warning and doesn't kill the Admin. Seems simple enough.

So will someone please make me an example script? Thanks in advance.

Posted

this is rather request than ask for help.

useful examples are in MTA Wiki

Check Server-side functions

You will need following functions (click on its name to be redirected to wiki help page)

addCommandHandler
isObjectInACLGroup -- to check priviligies/"admin" status
getPlayerFromName
killPed
outputChatBox

hmm, thats probably all.

useful examples, hints, help - they are all in the wiki :)

this wont be hard, as you know another programming languages and lua is extremly easy one :)

Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online!

programista php rzeszów

Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting.

Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!

Posted
Thanks man, I'll check it out! :mrgreen: And Lua does look somewhat similar to JavaScript.

it is like java, but then a litle diferent, there aren't any brackets ({ }) to close a function

but a 'end' :) and just other functions ;)

Posted

i know several programming languages, for me its pascal/delphi mixed with javascript

Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online!

programista php rzeszów

Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting.

Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!

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