Jump to content

Some Help Please


Guest radrm

Recommended Posts

can somebody fix this from going negative i've searched on it but others do not work

alias rpg.give { 
 var %a = $iif($4 == $null,$2,$iif($mta.name($1,$4) != Unknown,$4,$mta.getid($1,$4))) 
 if %a != -1 && %a != $2 { 
   if (($5) && ($5 isnum) && ($5 > 0)) { 
     if ($readini(rpg.ini,$mta.name($1,$2),cash) >= $5) { 
       mta.say $1 $mta.name($1,$2) gave $chr(36) $+ $5 to $mta.name($1,%a) 
       !writeini -n "rpg.ini" $mta.name($1,%a) cash $calc($rpg.cash($1,%a) + $5) 
       !writeini -n "rpg.ini" $mta.name($1,$2) cash $calc($rpg.cash($1,$2) - $5) 
     } 
     else mta.msg $1 $2 Error - You have not enough cash! 
   } 
   else mta.say $1 Syntax: !give 
 } 
 else mta.msg $1 $2 Cannot give urself/invalid person money 
}

Link to comment
  • Recently Browsing   0 members

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