Squall Posted December 6, 2006 Share Posted December 6, 2006 when i go to Sunshine Autos it still say Pm from Admin You Are Not At Sunshine Autos but every ting else works on *:SIGNAL:mta.command:{ if ($3 == !sellcar) { elseif ($mta.area($1,$2) == Sunshine-Autos) elseif ($mta.vehicle($1,$2).name != foot && $mta.vehicle($1,$2).name != Unknown) else { mta.say $1 $mta.name($1,$2) Sold $mta.vehicle($1,$2).name for $rpg.worth($1,$2) !writeini -n " $+ $scriptdir $+ Bank.ini" Bank $mta.name($1,$2) $calc($mta.bank($1,$2) + $rpg.worth($1,$2)) !writeini -n " $+ $scriptdir $+ BuySell.ini" Sell $mta.name($1,$2) $mta.vehicle($1,$2)) } else mta.msg $1 $2 You Are Not At Sunshine Autos } else mta.msg $1 $2 You Cant Sell Your Feet } dont mind $rpg.worth($1,$2) its a alias Link to comment
MeanpantheR Posted December 6, 2006 Share Posted December 6, 2006 on *:SIGNAL:mta.command:{ if ($3 == !sellcar) { if ($mta.area($1,$2) == Sunshine-Autos) { if ($mta.vehicle($1,$2).name != foot && $mta.vehicle($1,$2).name != Unknown) { mta.say $1 $mta.name($1,$2) Sold $mta.vehicle($1,$2).name for $rpg.worth($1,$2) !writeini -n " $+ $scriptdir $+ Bank.ini" Bank $mta.name($1,$2) $calc($mta.bank($1,$2) + $rpg.worth($1,$2)) !writeini -n " $+ $scriptdir $+ BuySell.ini" Sell $mta.name($1,$2) $mta.vehicle($1,$2)) } else mta.msg $1 $2 You need to be in a car } else mta.msg $1 $2 You're not at Sunshine Autos! } } try that, havn't scripted in awhile but should do what you want - you had the if's and else's messed up in your script Link to comment
Squall Posted December 7, 2006 Author Share Posted December 7, 2006 sorry to say still saying PM from Admin: You're not at Sunshine Autos! when Theoden Area: Sunshine-Autos Viceport Vice-City-Mainland Link to comment
lil Toady Posted December 7, 2006 Share Posted December 7, 2006 on *:SIGNAL:mta.command:{ if ($3 == !sellcar) { if (Sunshine-Autos isin $mta.area($1,$2)) { if (($mta.vehicle($1,$2).name != foot) && ($mta.vehicle($1,$2).name != Unknown)) { !writeini -n " $+ $scriptdir $+ Bank.ini" Bank $mta.name($1,$2) $calc($mta.bank($1,$2) + $rpg.worth($1,$2)) !writeini -n " $+ $scriptdir $+ BuySell.ini" Sell $mta.name($1,$2) $mta.vehicle($1,$2)) mta.say $1 $mta.name($1,$2) Sold $mta.vehicle($1,$2).name for $rpg.worth($1,$2) } else mta.msg $1 $2 You need to be in a car } else mta.msg $1 $2 You're not at Sunshine Autos! } } wasn't working coz mta.area retunrs not only sunshine-autos, it returns more text. Link to comment
Squall Posted December 8, 2006 Author Share Posted December 8, 2006 ty also can u make a heli kill kicker i tried hehe on *:SIGNAL:mta.kill:{ mta.say $1 $mta.name($1,$2) killed $mta.name($1,%a) with $mta.weapon($1,$4) if (($4 isnum) && ($4 <= 40))mta.kick($1,$2) } Link to comment
lil Toady Posted December 8, 2006 Share Posted December 8, 2006 on *:SIGNAL:mta.command:{ if ($4 == 40) { mta.say $1 Kicking $mta.name($1,$3) for heli killing! mta.kick $1 $3 } } Link to comment
Guest Posted December 8, 2006 Share Posted December 8, 2006 on *:SIGNAL:mta.command:{ var %a = $iif($4,$iif($mta.name($1,$4) != Unknown,$4,$mta.getid($1,$4)),$2) if ($3 == !gay) { if (%a == -1) mta.msg $1 $2 Error - Absent ID. else mta.say $1 $mta.name($1,%a) is Gay ! ! Link to comment
lil Toady Posted December 8, 2006 Share Posted December 8, 2006 on *:SIGNAL:mta.command:{ var %a = $iif($4,$iif($mta.name($1,$4) != Unknown,$4,$mta.getid($1,$4)),$2) if ($3 == !gay) { if (%a == -1) mta.msg $1 $2 Error - Absent ID. else mta.say $1 $mta.name($1,%a) is Gay ! ! yes, you're gay, and your code is with mistakes Link to comment
Squall Posted December 9, 2006 Author Share Posted December 9, 2006 on *:SIGNAL:mta.command:{ if ($4 == 40) { mta.say $1 Kicking $mta.name($1,$3) for heli killing! mta.kick $1 $3 } } wouldent it be mta.kill not mta.command or something eh im lost Link to comment
lil Toady Posted December 9, 2006 Share Posted December 9, 2006 on *:SIGNAL:mta.command:{ if ($4 == 40) { mta.say $1 Kicking $mta.name($1,$3) for heli killing! mta.kick $1 $3 } } wouldent it be mta.kill not mta.command or something eh im lost oh, yeah, didnt notice, thnx. on *:SIGNAL:mta.kill:{ if ($4 == 40) { mta.say $1 Kicking $mta.name($1,$3) for heli killing! mta.kick $1 $3 } } Link to comment
Guest Posted January 1, 2007 Share Posted January 1, 2007 on *:SIGNAL:mta.command:{ if ($3 == !sellcar) { if (Sunshine-Autos isin $mta.area($1,$2)) { if (($mta.vehicle($1,$2).name != foot) && ($mta.vehicle($1,$2).name != Unknown)) { !writeini -n " $+ $scriptdir $+ Bank.ini" Bank $mta.name($1,$2) $calc($mta.bank($1,$2) + $rpg.worth($1,$2)) !writeini -n " $+ $scriptdir $+ BuySell.ini" Sell $mta.name($1,$2) $mta.vehicle($1,$2)) mta.say $1 $mta.name($1,$2) Sold $mta.vehicle($1,$2).name for $rpg.worth($1,$2) } else mta.msg $1 $2 You need to be in a car } else mta.msg $1 $2 You're not at Sunshine Autos! } } Like lil Toady said, its checking for the person at "Sunshine-Autos", it would have to be the whole name listeded in the ini (I think, been ages since I scripted) Try changing the name in the ini to "Sunshine-Autos-Viceport-Vice-City-Mainland" Then change the code to: on *:SIGNAL:mta.command:{ if ($3 == !sellcar) { if ($mta.area($1,$2) == Sunshine-Autos-Viceport-Vice-City-Mainland) { if ($mta.vehicle($1,$2).name != foot && $mta.vehicle($1,$2).name != Unknown) { mta.say $1 $mta.name($1,$2) Sold $mta.vehicle($1,$2).name for $rpg.worth($1,$2) !writeini -n " $+ $scriptdir $+ Bank.ini" Bank $mta.name($1,$2) $calc($mta.bank($1,$2) + $rpg.worth($1,$2)) !writeini -n " $+ $scriptdir $+ BuySell.ini" Sell $mta.name($1,$2) $mta.vehicle($1,$2)) } else mta.msg $1 $2 You need to be in a car } else mta.msg $1 $2 You're not at Sunshine Autos! } } Link to comment
lil Toady Posted January 2, 2007 Share Posted January 2, 2007 Moontis, i already fixed that check by the 'isin' operator, instead of '==', i don't think that sunshine area is saved like you wrote btw Link to comment
Guest Posted January 3, 2007 Share Posted January 3, 2007 Ah my mistake, I never noticed the == and isin. Nice One for spotting it lil Toady, also, I mentioned changing the area name in the ini. Bah, nevermind, It seems he's solve the problem. Link to comment
Aeron Posted January 3, 2007 Share Posted January 3, 2007 Ah my mistake, I never noticed the == and isin.Nice One for spotting it lil Toady, also, I mentioned changing the area name in the ini. Bah, nevermind, It seems he's solve the problem. Don't edit existing entries in mta.data.ini Link to comment
Recommended Posts