31
mIRC/pawn Scripting / Re: Scripts needed!!!
« on: March 18, 2009, 04:17:31 pm »
yeah you are right it must doesn't work!! so don't try it......
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
elseif ($3 == buyprop) {
if ($FBS.lin($1, $2) == $null) vcmp.msg $1 $2 You must register to be able to use this command.
elseif (!$4) vcmp.msg $1 $2 Error - Correct Syntax: ! $+ $3 <Prop ID>
elseif ($4 !isnum) vcmp.msg $1 $2 Error, Invalid Prop ID
elseif ($4 > $fbs.propcount) vcmp.msg $1 $2 Error, Invalid Prop ID
elseif (. isin $4) || (, isin $4) || (- isin $4) vcmp.msg $1 $2 Error, No negative or decimal prop id's
elseif ($FBS.PropPrice($4) > $FBS.actcash($1, $2)) vcmp.msg $1 $2 Error, You do not have enough cash to buy this property
elseif ($FBS.PropDistance($2, $4) > 10) vcmp.msg $1 $2 Error, You must be closer to the property
elseif ($FBS.PropOwner($4) != Vice City) vcmp.msg $1 $2 Error, This property is already owned by $FBS.PropOwner($4)
elseif ($FBS.Myprops($1, $2) >= 2) vcmp.msg $1 $2 Error, You have reached your property limit
else {
vcmp.say $1 ** Selling $FBS.PropName($4) (ID: $4 $+ ) to $vcmp.name($1, $2)
vcmp.msg $1 $2 Cost:[ $ $+ $FBS.Propprice($4) $chr(93) New Balance:[ $ $+ $fbs.actcash($1, $2) $chr(93)
vcmp.msg $1 $2 To spawn at your property type: /c propspawn $4 on
FBS.DecCash $1 $2 $FBS.PropPrice($4)
!remini -n FBS.propowners.ini OWNERS $4
!writeini -n FBS.propowners.ini OWNERS $4 $vcmp.name($1, $2)
FBS.IncMyprops $1 $2 1
fbs.checkprops
}
}
elseif ($3 == sellprop) {
if ($FBS.lin($1, $2) == $null) vcmp.msg $1 $2 You must register to be able to use this command.
elseif (!$4) vcmp.msg $1 $2 Error - Correct Syntax: ! $+ $3 <Prop ID>
elseif ($4 !isnum) vcmp.msg $1 $2 Error, Invalid Prop ID
elseif ($4 > $fbs.propcount) vcmp.msg $1 $2 Error, Invalid Prop ID
elseif (. isin $4) || (, isin $4) || (- isin $4) vcmp.msg $1 $2 Error, No negative or decimal prop id's
elseif ($FBS.PropOwner($4) != $vcmp.name($1, $2)) vcmp.msg $1 $2 Error, You do not own this property
elseif ($FBS.SpawnSetting($5) == on) vcmp.msg $1 $2 Error, You need to turn off property spawning first
else {
vcmp.say $1 ** $vcmp.name($1, $2) has sold there $FBS.PropName($4) (ID: $4 $+ )
vcmp.msg $1 $2 Cash Return:[ $ $+ $FBS.Propprice($4) $chr(93) New Balance:[ $ $+ $fbs.actcash($1, $2) $chr(93)
FBS.IncCash $1 $2 $calc($FBS.PropPrice($4) / 2)
!remini -n FBS.PropSpawn.ini SPAWN $FBS.PropShares($4)
!remini -n FBS.PropSpawn.ini STATUS $FBS.PropShares($4)
!remini -n FBS.propowners.ini OWNERS $4
!remini -n FBS.PropSpawn.ini SPAWN $vcmp.name($1, $2)
!remini -n FBS.PropSpawn.ini STATUS $vcmp.name($1, $2)
!writeini -n FBS.propowners.ini OWNERS $4 Vice City
FBS.DecMyProps $1 $2 1
fbs.checkprops
}
}
elseif ($3 == home) {
if ($FBS.lin($1, $2) == $null) vcmp.msg $1 $2 You must register to be able to use this command.
elseif (!$4) vcmp.msg $1 $2 Error - Correct Syntax: ! $+ $3 <Prop ID>
elseif ($4 !isnum) vcmp.msg $1 $2 Error, Invalid Prop ID
elseif ($4 > $fbs.propcount) vcmp.msg $1 $2 Error, Invalid Prop ID
elseif (. isin $4) || (, isin $4) || (- isin $4) vcmp.msg $1 $2 Error, No negative or decimal prop id's
elseif ($FBS.PropOwner($4) != $vcmp.name($1, $2)) && ($FBS.PropShares($4) != $vcmp.name($1, $2)) vcmp.msg $1 $2 Error, You do not own or share this property
else {
var %loc = $readini(FBS.PropSpawn.ini,LOCATION,$4)
vcmp.msg $1 $2 Sending you to $FBS.PropName($4)
vcmp.setlocation $1 $2 %loc
}
}
elseif ($3 == shareprop) {
if ($FBS.lin($1, $2) == $null) vcmp.msg $1 $2 You must register to be able to use this command.
elseif (!$4) vcmp.msg $1 $2 Error - Correct Syntax: ! $+ $3 <Nick/ ID> <Prop ID>
elseif (!$5) vcmp.msg $1 $2 Error - Correct Syntax: ! $+ $3 <Nick/ ID> <Prop ID>
elseif ($vcmp.name($1, $4) == Unknown) vcmp.msg $1 $2 Error, Invalid Nick or ID
elseif ($FBS.PropOwner($5) != $vcmp.name($1, $2)) vcmp.msg $1 $2 Error, You do not own this property
elseif ($FBS.PropShares($5) != None) vcmp.msg $1 $2 Error, This property has already been shared
else {
vcmp.msg $1 $2 You are now sharing your $FBS.PropName($5) (ID: $5 $+ ) with $vcmp.name($1, $FBS.ID($4))
vcmp.msg $1 $FBS.ID($4) $vcmp.name($1, $2) is now sharing there $FBS.PropName($5) (ID: $5 $+ ) with you
!writeini -n FBS.PropOwners.ini SHARES $5 $vcmp.name($1, $FBS.ID($4))
}
}
elseif ($3 == delshareprop) {
if ($FBS.lin($1, $2) == $null) vcmp.msg $1 $2 You must register to be able to use this command.
elseif (!$4) vcmp.msg $1 $2 Error - Correct Syntax: ! $+ $3 <Prop ID>
elseif ($FBS.PropOwner($4) != $vcmp.name($1, $2)) vcmp.msg $1 $2 Error, You do not own this property
elseif ($FBS.PropShares($4) == None) vcmp.msg $1 $2 Error, This property has not been shared
else {
vcmp.msg $1 $2 You are no longer sharing your $FBS.PropName($4) (ID: $4 $+ ) with $FBS.Propshares($4)
!remini -n FBS.PropOwners.ini SHARES $4
!remini -n FBS.PropSpawn.ini SPAWN $FBS.PropShares($4)
!remini -n FBS.PropSpawn.ini STATUS $FBS.PropShares($4)
}
}
elseif ($3 == sharedprops) {
if ($FBS.lin($1, $2) == $null) vcmp.msg $1 $2 You must register to be able to use this command.
else {
var %a = 1, %b = 0
while (%a <= %propcount) && (%b == 0) {
if ($FBS.PropShares(%a) == $vcmp.name($1, $2)) {
!inc %b
}
!inc %a
}
if (%b == 0) vcmp.msg $1 $2 You do not share a property
elseif (%b >= 1) vcmp.msg $1 $2 You currently share properties:[ $FBS.getmysharedprops($1, $2) $chr(93)
}
}
elseif ($3 == myprops) {
if ($FBS.lin($1, $2) == $null) vcmp.msg $1 $2 You must register to be able to use this command.
elseif ($FBS.MyProps($1, $2) == 0) vcmp.msg $1 $2 You do not own a property
elseif ($FBS.MyProps($1, $2) == 1) {
vcmp.msg $1 $2 You currently own 1 property:[ $FBS.getmyprops($1, $2) $chr(93)
}
elseif ($FBS.MyProps($1, $2) == 2) {
vcmp.msg $1 $2 You currently own 2 properties:[ $FBS.getmyprops($1, $2) $chr(93)
}
}
elseif ($3 == addprop) {
if ($FBS.lin($1, $2) == $null) vcmp.msg $1 $2 You must either register or be logged in as Admin Level 10.
elseif ($FBS.Level($1, $2) < 10) vcmp.msg $1 $2 Error, You need to be at least level 10 to use this command.
elseif (!$4) vcmp.msg $1 $2 Error - Correct Syntax: ! $+ $3 <Cost> <Name>
elseif (!$5) vcmp.msg $1 $2 Error - Correct Syntax: ! $+ $3 <Cost> <Name>
elseif ($4 !isnum) vcmp.msg $1 $2 Error, Invalid Property Cost
elseif (. isin $4) || (, isin $4) || (- isin $4) vcmp.msg $1 $2 Error, No negative or decimal Property Cost
else {
vcmp.msg $1 $2 Property Added, Price: $ $+ $4 $+ , Name: $5-
!writeini -n FBS.PropCount.ini COUNT Count $calc($FBS.PropCount + 1)
!writeini -n FBS.PropOwners.ini OWNERS $FBS.PropCount Vice City
!writeini -n FBS.PropNames.ini NAMES $FBS.PropCount $5-
!writeini -n FBS.PropCosts.ini COSTS $FBS.PropCount $4
!writeini -n FBS.PropLocs.ini x $FBS.PropCount $vcmp.location($1, $2).x
!writeini -n FBS.PropLocs.ini y $FBS.PropCount $vcmp.location($1, $2).y
!writeini -n FBS.PropLocs.ini z $FBS.PropCount $vcmp.location($1, $2).z
!writeini -n FBS.PropSpawn.ini LOCATION $FBS.PropCount $calc($vcmp.location($1, $2).x - 2) $calc($vcmp.location($1, $2).y + 2) $vcmp.location($1, $2).z
vcmp.newpickup $1 407 $calc($vcmp.location($1, $2).x + 2) $vcmp.location($1, $2).y $vcmp.location($1, $2).z
fbs.checkprops
}
}
elseif ($3 == buycar) {
if ($FBS.lin($1, $2) == $null) vcmp.msg $1 $2 You must register to be able to use this command.
elseif (!$4) vcmp.msg $1 $2 Error - Correct Syntax: ! $+ $3 <Car ID>
elseif ($4 !isnum) vcmp.msg $1 $2 Error, Invalid Car ID
elseif ($4 > $calc(%FBS.vehicles - 1)) vcmp.msg $1 $2 Error, Invalid Car ID
elseif (. isin $4) || (, isin $4) || (- isin $4) vcmp.msg $1 $2 Error, No negative or decimal car id's
elseif ($FBS.CarPrice($4) > $FBS.actcash($1, $2)) vcmp.msg $1 $2 Error, You do not have enough cash to buy this vehicle
elseif ($FBS.CarOwner($4) != Sunshine Auto's) vcmp.msg $1 $2 Error, This vehicle is already owned by $FBS.CarOwner($4)
elseif ($vcmp.vehiclename($1, $vcmp.vehicle($1, $2)) == Unknown) vcmp.msg $1 $2 Error, This is an unknown vehiclw
elseif (Sunshine !isin $FBS.Buildings($1, $2)) vcmp.msg $1 $2 Error, You must be located at Sunshine Auto's
elseif ($vcmp.vehicle($1, $2) != $4) vcmp.msg $1 $2 Error, You must be in the car you want to buy
elseif ($FBS.Mycars($1, $2) >= 2) vcmp.msg $1 $2 Error, You have reached your vehicle limit
else {
vcmp.say $1 ** Selling $vcmp.vehiclename($1, $vcmp.vehicle($1, $2)) (ID: $vcmp.vehicle($1, $2) $+ ) to $vcmp.name($1, $2)
vcmp.msg $1 $2 Cost:[ $ $+ $FBS.Carprice($4) $chr(93) New Balance:[ $+ $fbs.actcash($1, $2) $chr(93)
FBS.DecCash $1 $2 $FBS.Carprice($4)
!remini -n FBS.carowners.ini OWNERS $vcmp.vehicle($1, $2)
!writeini -n FBS.carowners.ini OWNERS $vcmp.vehicle($1, $2) $vcmp.name($1, $2)
FBS.IncMyCars $1 $2 1
!writeini -n FBS.mycarsinfo.ini INFO $vcmp.vehicle($1, $2) $vcmp.name($1, $2)
}
}
elseif ($3 == sharecar) {
if ($FBS.lin($1, $2) == $null) vcmp.msg $1 $2 You must register to be able to use this command.
elseif (!$4) vcmp.msg $1 $2 Error - Correct Syntax: ! $+ $3 <Nick/ ID>
elseif ($vcmp.name($1, $4) == Unknown) vcmp.msg $1 $2 Error, Invalid Nick or ID
elseif ($FBS.CarOwner($vcmp.vehicle($1, $2)) != $vcmp.name($1, $2)) vcmp.msg $1 $2 Error, You do not own this vehicle
elseif ($vcmp.vehiclename($1, $vcmp.vehicle($1, $2)) == Unknown) vcmp.msg $1 $2 Error, This is an unknown vehicle
elseif ($FBS.CarShares($vcmp.vehicle($1, $2)) != None) vcmp.msg $1 $2 Error, This car has already been shared
else {
vcmp.msg $1 $2 You are now sharing your $vcmp.vehiclename($1, $vcmp.vehicle($1, $2)) (ID: $vcmp.vehicle($1, $2) $+ ) with $vcmp.name($1, $FBS.ID($4))
vcmp.msg $1 $FBS.ID($4) $vcmp.name($1, $2) is now sharing there $vcmp.vehiclename($1, $vcmp.vehicle($1, $2)) (ID: $vcmp.vehicle($1, $2) $+ ) with you
!writeini -n FBS.sharecarsinfo.ini SHARES $vcmp.vehicle($1, $2) $vcmp.name($1, $FBS.ID($4))
}
}
elseif ($3 == delsharecar) {
if ($FBS.lin($1, $2) == $null) vcmp.msg $1 $2 You must register to be able to use this command.
elseif ($FBS.CarOwner($vcmp.vehicle($1, $2)) != $vcmp.name($1, $2)) vcmp.msg $1 $2 Error, You do not own this vehicle
elseif ($vcmp.vehiclename($1, $vcmp.vehicle($1, $2)) == Unknown) vcmp.msg $1 $2 Error, This is an unknown vehicle
elseif ($FBS.CarShares($vcmp.vehicle($1, $2)) == None) vcmp.msg $1 $2 Error, This vehicle has not been shared
else {
vcmp.msg $1 $2 You are no longer sharing your $vcmp.vehiclename($1, $vcmp.vehicle($1, $2)) (ID: $vcmp.vehicle($1, $2) $+ ) with $FBS.Carshares($vcmp.vehicle($1, $2))
!remini -n FBS.sharecarsinfo.ini SHARES $vcmp.vehicle($1, $2)
}
}
elseif ($3 == sellcar) {
if ($FBS.lin($1, $2) == $null) vcmp.msg $1 $2 You must register to be able to use this command.
elseif (!$4) vcmp.msg $1 $2 Error - Correct Syntax: ! $+ $3 <Car ID>
elseif ($4 !isnum) vcmp.msg $1 $2 Error, Invalid Car ID
elseif ($4 > $calc(%FBS.vehicles - 1)) vcmp.msg $1 $2 Error, Invalid Car ID
elseif (. isin $4) || (, isin $4) || (- isin $4) vcmp.msg $1 $2 Error, No negative or decimal car id's
elseif (Sunshine !isin $FBS.Buildings($1, $2)) vcmp.msg $1 $2 Error, You must be located at Sunshine Auto's
elseif ($vcmp.vehicle($1, $2) != $4) vcmp.msg $1 $2 Error, You must be in the car you want to sell
elseif ($FBS.carowner($vcmp.vehicle($1, $2)) != $vcmp.name($1, $2)) vcmp.msg $1 $2 Error, You do not own this vehicle
elseif ($vcmp.vehiclename($1, $vcmp.vehicle($1, $2)) == Unknown) vcmp.msg $1 $2 Error, This is an unknown vehiclw
elseif ($FBS.Carshares($vcmp.vehicle($1, $2)) != None) vcmp.msg $1 $2 You must remove the share of this car first
else {
vcmp.say $1 ** $vcmp.name($1, $2) has sold there $vcmp.vehiclename($1, $vcmp.vehicle($1, $2)) (ID: $vcmp.vehicle($1, $2) $+ )
vcmp.msg $1 $2 Cash Return:[ $ $+ $calc($FBS.Carprice($4) /2) $chr(93) New Balance:[ $ $+ $fbs.actcash($1, $2) $chr(93)
FBS.IncCash $1 $2 $calc($FBS.Carprice($4) /2)
!remini -n FBS.carowners.ini OWNERS $vcmp.vehicle($1, $2)
!writeini -n FBS.carowners.ini OWNERS $vcmp.vehicle($1, $2) Sunshine Auto's
FBS.DecMyCars $1 $2 1
!remini -n FBS.mycarsinfo.ini INFO $vcmp.vehicle($1, $2)
}
}
elseif ($3 == getcar) {
if ($FBS.lin($1, $2) == $null) vcmp.msg $1 $2 You must register to be able to use this command.
elseif (!$4) vcmp.msg $1 $2 Error - Correct Syntax: ! $+ $3 <Car ID>
elseif ($4 !isnum) vcmp.msg $1 $2 Error, Invalid Car ID
elseif (. isin $4) || (, isin $4) || (- isin $4) vcmp.msg $1 $2 Error, No negative or decimal car id's
elseif ($4 > $calc(%FBS.vehicles - 1)) vcmp.msg $1 $2 Error, Invalid Car ID
elseif ($FBS.rwarstatus($2) == 1) vcmp.msg $1 $2 You cannot get a vehicle, your are in a minigame
elseif ($vcmp.vehicle($1, $2) != 0) vcmp.msg $1 $2 Error, You must be on foot to use this command
elseif ($FBS.carowner($4) == $vcmp.name($1, $2)) {
vcmp.setvehicleloc $1 $4 $calc($vcmp.location($1, $2).x + 2) $vcmp.location($1, $2).y $calc($vcmp.location($1, $2).z - 1.12)
vcmp.msg $1 $2 Getting Vehicle:[ $hget(VehicleNames,$4) $chr(93)
}
elseif ($FBS.carshares($4) == $vcmp.name($1, $2)) {
vcmp.setvehicleloc $1 $4 $calc($vcmp.location($1, $2).x + 2) $vcmp.location($1, $2).y $calc($vcmp.location($1, $2).z - 1.12)
vcmp.msg $1 $2 Getting Vehicle:[ $hget(VehicleNames,$4) $chr(93)
}
else {
vcmp.msg $1 $2 You do not own or share this vehicle
}
}