Jump to content

!addpoints command


proracer

Recommended Posts

I made a little script for this command and you can add some player sum of points.It's only for admin level 4 or higher.I know i made something wrong.If so please help me.

if ($3 == !addpoints) { 
elseif ($4 == $null ) mta.pm $1 $2 Error: Please specify a name and ammount, !addpoints <name> <ammount> 
mta.text $1 $mta.nick($1,$2) gave $mta.nick($1,%a)  >=0 { 
!hadd prsrank $mta.nick($1,$2) $calc($prs.points($1,$2) + >=0 
if ($prs.level($1,$2) >=4 
} 

Link to comment
  
if ($3 == !addpoints) { 
  if ($prs.level($1,$2) >=4) { 
    if ($4 == $null ) mta.pm $1 $2 Error: Please specify a name and ammount, !addpoints <name> <ammount>  
    else { 
      mta.text $1 $mta.nick($1,$2) gave $mta.nick($1,%a)  >=0 { 
      !hadd prsrank $mta.nick($1,$2) $calc($prs.points($1,$2) + >=0 
    }   
  } 
} 
  

Edited by Guest
Link to comment

if ($3 == !addpoints) {

if ($prs.level($1,$2) >=4) {

if ($4 == $null ) mta.pm $1 $2 Error: Please specify a name and ammount, !addpoints

else {

mta.text $1 $mta.nick($1,$2) gave $mta.nick($1,%a) >=0 {

!hadd prsrank $mta.nick($1,$2) $calc($prs.points($1,$2) + >=0

}

}

}

[/code

Lol.I didn't know i made good just minor mistakes.Thx i will check it out now.

Link to comment

I added this command too.I hope its working.

if ($3 == !addcash) { 
if ($prs.level($1,$2) >=4) { 
if ($4 == $null ) mta.pm $1 $2 Error: Please specify a name and ammount, !addcash <name> <ammount> 
else { 
mta.text $1 $mta.nick($1,$2) gave $mta.nick($1,%a) >=0 { 
pgs.add $mta.nick($1,$2) + >=0 
} 
} 
} 

Link to comment

if ($3 == !addcash) { 
if ($prs.level($1,$2) >=4) { 
if ($4 == $null ) mta.pm $1 $2 Error: Please specify a name and ammount, !addcash <name> <ammount> 
else { 
mta.text $1 $mta.nick($1,$2) gave $mta.nick($1,%a) >=0 { 
pgs.add $mta.nick($1,$2) + >=0 
} 
} 
} 

No this will not work i am sorry

(My previous one even don't work)

Addcash

if ($3 == !addcash) { 
if ($prs.level($1,$2) >= 4) { 
if ($4 == $null ) mta.pm $1 $2 Error: Please specify a name and ammount, !addcash <name> <ammount> 
else { 
mta.text $1 $mta.nick($1,$2) gave $mta.nick($1,%a) $5 
pgs.add $mta.nick($1,$2) $5 
} 
} 
} 

Addpoints

  
if ($3 == !addpoints) { 
  if ($prs.level($1,$2) >=4) { 
    if ($4 == $null ) mta.pm $1 $2 Error: Please specify a name and ammount, !addpoints <name> <ammount>  
    else { 
      mta.text $1 $mta.nick($1,$2) gave $mta.nick($1,%a)  $5 
      !hadd prsrank $mta.nick($1,$2) $calc($prs.points($1,$2) + $5) 
    }   
  } 
} 
  

Link to comment

if ($3 == !addcash) { 
if ($prs.level($1,$2) >=4) { 
if ($4 == $null ) mta.pm $1 $2 Error: Please specify a name and ammount, !addcash <name> <ammount> 
else { 
mta.text $1 $mta.nick($1,$2) gave $mta.nick($1,%a) >=0 { 
pgs.add $mta.nick($1,$2) + >=0 
} 
} 
} 

No this will not work i am sorry

(My previous one even don't work)

Addcash

if ($3 == !addcash) { 
if ($prs.level($1,$2) >= 4) { 
if ($4 == $null ) mta.pm $1 $2 Error: Please specify a name and ammount, !addcash <name> <ammount> 
else { 
mta.text $1 $mta.nick($1,$2) gave $mta.nick($1,%a) $5 
pgs.add $mta.nick($1,$2) $5 
} 
} 
} 

Addpoints

  
if ($3 == !addpoints) { 
  if ($prs.level($1,$2) >=4) { 
    if ($4 == $null ) mta.pm $1 $2 Error: Please specify a name and ammount, !addpoints <name> <ammount>  
    else { 
      mta.text $1 $mta.nick($1,$2) gave $mta.nick($1,%a)  $5 
      !hadd prsrank $mta.nick($1,$2) $calc($prs.points($1,$2) + $5) 
    }   
  } 
} 
  

Ok.Thanks.Not much changed.But i don't know what means that change $5 parameter? Didn't seen it.Ok thx anyway.

Link to comment

if (($3 == !addpt) && ($mta.level($1,$2) == 7)) {

var %points = $calc($hget(prsrank,$mta.nick($1,%a)) + $5)

!hadd prsrank $mta.nick($1,%a) %points

mta.text $1 /me added $5 points to $mta.nick($1,%a) $+ 's points: $hget(prsrank,$mta.nick($1,%a))

}

© DDC script

Link to comment
if (($3 == !addpt) && ($mta.level($1,$2) == 7)) {

var %points = $calc($hget(prsrank,$mta.nick($1,%a)) + $5)

!hadd prsrank $mta.nick($1,%a) %points

mta.text $1 /me added $5 points to $mta.nick($1,%a) $+ 's points: $hget(prsrank,$mta.nick($1,%a))

}

© DDC script

That is not script for PRS1.3 because it turns that level 7 admin or higher and PRS1.3 have only to level 5.Anyway thx.And i didn't know you can use /me in script.Is it possible to do in PRS1.3 script?

Link to comment
  • 1 month later...

on *:SIGNAL:mta.command: {

var %a = $iif((!$4),$2,$iif(($prs.getid($1,$4) == $null),$2,$v1))

if ($3 == !addpt) {

if ($prs.level($1,$2) >= 4) {

if (!$4) mta.pm $1 $2 Error: Please specify a name and ammount, !addpoints

elseif (%a == $2) mta.pm $1 $2 Error: Cannot Ban Self!

else {

var %points = $calc($hget(prsrank,$mta.nick($1,%a)) + $5)

!hadd prsrank $mta.nick($1,%a) %points

mta.text $1 /me added $5 points to $mta.nick($1,%a) $+ 's points: $hget(prsrank,$mta.nick($1,%a))

}

}

}

elseif ($3 == !addcash) {

if ($prs.level($1,$2) >= 4) {

if (!$4) mta.pm $1 $2 Error: Please specify a name and ammount, !addcash

elseif (%a == $2) mta.pm $1 $2 Error: Cannot Ban Self!

else {

mta.text $1 /me added $5 cash to $mta.nick($1,%a) $+ 's cash: $hget(pgscash,$mta.nick($1,%a))

pgs.add $mta.nick($1,%a) $5

}

:P

Link to comment
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...