proracer

!addpoints command

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 
} 

Share this post


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

Share this post


Link to post

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.

Share this post


Link to post

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

Share this post


Link to post

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

Share this post


Link to post

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.

Share this post


Link to post

When i typ ingame !addcash

$3 = !addcash

$4 = ($3 is even used in the script as %a)

$5 = in this case it this the amount

Share this post


Link to post

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

Share this post


Link to post
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?

Share this post


Link to post

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

Share this post


Link to post

sheesh... if u want more cash.. if u want more points... WIN MORE! :mrgreen:

Share this post


Link to post

  • Recently Browsing   0 members

    No registered users viewing this page.