Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

/kill?


zach4873
 Share

Recommended Posts

would this work ? if so then cool my first newbie script :)  if not can someone explain why and how to fix it also idk if CallTargetName is an actual thing and if its not what i want it to do is send a global message that an admin ( if possible could it send the admins name to ?) killed a player

```
                case "/kill"
                        If GetPlayerAccess(Index) = >3
                        If GetPlayerTarget(Index) = >0
                        Send TargetDamage(Index) = 100000
                        Call GlobalMsg(Index, "An Admin has just killed "CallTargetName

```
Link to comment
Share on other sites

@zach4873:

> would this work ? if so then cool my first newbie script :)  if not can someone explain why and how to fix it also idk if CallTargetName is an actual thing and if its not what i want it to do is send a global message that an admin ( if possible could it send the admins name to ?) killed a player
>
> ```
>                 case "/kill"
>                         If GetPlayerAccess(Index) = >3
>                         If GetPlayerTarget(Index) = >0
>                         Send TargetDamage(Index) = 100000
>                         Call GlobalMsg(Index, "An Admin has just killed "CallTargetName
>
> ```

Holy…That is a mess.

```
              Case "/kill"
                        If GetPlayerAccess(Index) > 2 Then
                        If GetPlayerAccess(Target) < GetPlayerAccess(Index) Then
                        If GetPlayerTarget(Index) > 0 Then
                        Call DamagePlayer(Index, Target, GetPlayerMaxHP(Target))
                        Call GlobalMsg(Index, "An Admin has just killed " & Target, BRIGHTRED)]
                        Exit Sub
                        End If
                        End If
                        End If
```
Link to comment
Share on other sites

Hmmm, Riney how come I've never seen you on the forums before? Anyways, I'm not an expert scripter, but Riney's looks right. I would have done it like this:

```
Case "/kill"
                        If GetPlayerAccess(Index) > 2 Then
                        If GetPlayerAccess(Target) < GetPlayerAccess(Index) Then
                        If GetPlayerTarget(Index) > 0 Then
                        Call DamagePlayer(Index, Target, GetPlayerMaxHP(Target))
                        Call GlobalMsg(Index, "An Admin has just killed " & Target, BRIGHTRED)]
                        End If
                        End If
                        End If
End Sub
```
But that wouldn't work now would it?
Link to comment
Share on other sites

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
 Share

×
×
  • Create New...