Hello. I need a bit help with my drugs script.
i made a script that if i type !Drugs it says the drugs what i own
that work perfectly
but i have a problem with a !buyweed script
i want that i want choose how much i want to buy
Example:
!buyweed 1 to 100 etc.
in my script i can only buy 10 Kg of weed.
when i buyweed my cash goes to $-10000
i want a pm says: You dont have enough money to buy weed.
This is what i wrote:
on *:SIGNAL:mta.command: {
var %a = $iif($4 == $null,$2,$iif($mta.getid($1,$4) == -1,$2,$v1))
if ($3 = !Buyweed) {
if (Ryton Aide !isin $mta.area($1,$2)) mta.msg $1 $2 You Are Not At Ryton Aide
else {
mta.say $1 $mta.name($1,$2) Brought 10 Kg Of Weed.
writeini MTAScript.ini Cash $mta.name($1,$2) $calc($mta.cash($1,$2) - 10000)
writeini Drugs.ini Drugs $mta.name($1,%a) $calc($mta.drugs($1,%a) + 10)
}
}
}
alias mta.cash !return $iif($readini(MTAScript.ini,Cash,$mta.name($1,$2)) == $null,0,$v1)
alias mta.drugs !return $iif($readini(Drugs.ini,Drugs,$mta.name($1,$2)) == $null,0,$v1)
Thnx WestCoast