• Welcome to Vice City Multiplayer.
 

FBS v0.2 (Force's Beginner Scripts)

Started by Force, October 21, 2008, 06:12:56 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

TLK.NicoArin

Quote from: thebest12 on October 22, 2008, 05:54:54 AM
mmm. when you add a prop and then you get the icon it saids that the name is unknown and the price is 100 D: and what is the command to delete the prop cuz I try !deleteprop but dont work :(
Go to the Props files and change the 1 to 40, 2 to 41, 3 to 42.......

TLK.NicoArin


[GM]The_Don

Nice Script Man, only one issue i have with it ;)

When i do /c propspawn 1 on, it just take me to my prop, when i enter the command.

Is it possible that it automaticly bring you to your prop?
I also tried to add this Script Pack which you posted here already, but that
didnt helped much more =(

Any Solutions?

StriKe



Tonys

#80
To make Property System work... replace commands in script with these one's

 elseif ($3 == buyprop) {
   if ($FBS.lin($1, $2) == $null) vcmp.msg $1 $2 You must be logged in.
   elseif (!$4) vcmp.msg $1 $2 Syntax: ! $+ $3 <Place ID>
   elseif ($4 !isnum) vcmp.msg $1 $2 Invalid Place ID
   elseif ($4 > $fbs.propcount) vcmp.msg $1 $2 Invalid Place ID
   elseif (. isin $4) || (, isin $4) || (- isin $4) vcmp.msg $1 $2 No negative or decimal place id's
   elseif ($FBS.PropPrice($4) > $FBS.actcash($1, $2)) vcmp.msg $1 $2 You do not have enough cash to buy this property
   elseif ($FBS.PropDistance($2, $4) > 10) vcmp.msg $1 $2 You must be closer to the property
   elseif ($FBS.PropOwner($4) != Vice City) vcmp.msg $1 $2 This property is already owned by $FBS.PropOwner($4)
   elseif ($FBS.Myprops($1, $2) >= 2) vcmp.msg $1 $2 You have reached your property limit.
   else {
     vcmp.say $1 ** $vcmp.name($1, $2) has bought Property - $FBS.PropName($4) (ID: $4 $+ )
     vcmp.msg $1 $2 Property Cost: $ $+ $FBS.PropPrice($4)
     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
   }
 }
 elseif ($3 == sellprop) {
   if ($FBS.lin($1, $2) == $null) vcmp.msg $1 $2 You must be logged in.
   elseif (!$4) vcmp.msg $1 $2 Syntax: ! $+ $3 <Place ID>
   elseif ($4 !isnum) vcmp.msg $1 $2 Invalid Place ID
   elseif ($4 > $fbs.propcount) vcmp.msg $1 $2 Invalid Place ID
   elseif ($FBS.PropDistance($2, $4) > 10) vcmp.msg $1 $2 You must be closer to the property
   elseif (. isin $4) || (, isin $4) || (- isin $4) vcmp.msg $1 $2 No negative or decimal place id's
   elseif ($FBS.PropOwner($4) != $vcmp.name($1, $2)) vcmp.msg $1 $2 You do not own this property
   elseif ($FBS.SpawnSetting($5) == on) vcmp.msg $1 $2 You need to turn off property spawning first
   else {
     vcmp.say $1 ** $vcmp.name($1, $2) has sold Property - $FBS.PropName($4) (ID: $4 $+ )
     vcmp.msg $1 $2 Selling Price: $ $+ $FBS.Propprice($4)
     FBS.IncCash $1 $2 $FBS.PropPrice($4)
     !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
   }
 }
 elseif ($3 == addplace) {
   if ($FBS.lin($1, $2) == $null) vcmp.msg $1 $2 You must be logged in.
   elseif ($FBS.Level($1, $2) < 3) vcmp.msg $1 $2 Must be level 3.
   elseif (!$4) vcmp.msg $1 $2 Syntax: ! $+ $3 <Cost> <Name>
   elseif (!$5) vcmp.msg $1 $2 Syntax: ! $+ $3 <Cost> <Name>
   elseif ($4 !isnum) vcmp.msg $1 $2 Invalid Property Cost
   elseif (. isin $4) || (, isin $4) || (- isin $4) vcmp.msg $1 $2 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
     FBS.LoadProps $1
   }
 }


Then replace all property aliases with these one..

alias FBS.PropCount !return $iif($readini(FBS.PropCount.ini,COUNT,Count),$v1,0)
alias FBS.PropPrice !return $iif($readini(FBS.PropCosts.ini,COSTS,$1),$v1,100000)
alias FBS.PropOwner !return $iif($readini(FBS.PropOwners.ini,OWNERS,$1),$v1,Vice City)
alias FBS.PropShares !return $iif($readini(FBS.PropOwners.ini,SHARES,$1),$v1,None)
alias FBS.PropName !return $iif($readini(FBS.PropNames.ini,NAMES,$1),$v1,Unknown)
alias FBS.Mypropshares !return $iif($readini(FBS.MyProps.ini,SCOUNT,$vcmp.name($1, $2)),$v1,0)
alias FBS.PropLoc !return $iif($readini(FBS.PropLocs.ini,LOCATIONS,$1),$v1,Unknown)
alias FBS.IncMyProps !writeini -n FBS.MyProps.ini COUNT $vcmp.name($1, $2) $calc($FBS.MyProps($1, $2) + $iif($3,$v1,0))
alias FBS.DecMyProps !writeini -n FBS.MyProps.ini COUNT $vcmp.name($1, $2) $calc($FBS.MyProps($1, $2) - $iif($3,$v1,0))
alias FBS.MyProps !return $iif($readini(FBS.MyProps.ini,COUNT,$vcmp.name($1, $2)),$v1,0)
alias FBS.SpawnSetting !return $iif($readini(FBS.PropSpawn.ini,STATUS,$vcmp.name($1, $2)),$v1,0ff)
alias FBS.LoadProps {
 var %a = 1
 set %propcount 0

 while (%a <= 100) {
   if (%a <= $FBS.PropCount) {
     vcmp.newpickup 1 407 $readini(FBS.PropLocs.ini,x,%a) $readini(FBS.PropLocs.ini,y,%a) $readini(FBS.PropLocs.ini,z,%a)
     !inc %propcount
   }
   !inc %a
 }
 timer.checkproperties 1 8 FBS.CheckCount
}
alias FBS.getmysharedprops {
 var %a = 1
 while (%a <= %propcount) {
   if ($readini(FBS.PropOwners.ini,SHARES,%a) == $vcmp.name($1, $2)) var %b = %b $readini(FBS.PropNames.ini,NAMES,%a) $+ , ID: %a -
   !inc %a
 }
 !return %b
}
alias FBS.CheckCount {
 if (%propcount == $FBS.PropCount) {
   FBS.Echo 7 $+ $chr(91) %propcount $+ / $+ $FBS.PropCount $chr(93) Properties Loaded Succesfully
 }
 else FBS.Echo 7Error loading Properties $chr(91) %propcount $+ / $+ $FBS.PropCount $chr(93)
}
alias FBS.PropInfo {
 var %a = 1
 while (%a <= 100) {
   if (%a == $1) {
     if ($FBS.PropOwner($1) == Vice City) {
       vcmp.msg 1 $2 **** FOR SALE ****
       vcmp.msg 1 $2 Property: $FBS.PropName($1) $+ ( $+ $1 $+ )
       vcmp.msg 1 $2 Owner: Vice City // Cost: $ $+ $FBS.PropPrice($1)
     }
     elseif ($FBS.PropOwner($1) != Vice City) && ($FBS.PropShares($1) != None) {
       vcmp.msg 1 $2 Property: $FBS.PropName($1) $+ ( $+ $1 $+ ) // Owner: $FBS.PropOwner($1) // Price: $ $+ $FBS.PropPrice($1)      
     }
     elseif ($FBS.PropOwner($1) != Vice City) && ($FBS.PropShares($1) == None) {
       vcmp.msg 1 $2 Property: $FBS.PropName($1) $+ ( $+ $1 $+ ) // Owner: $FBS.PropOwner($1) // Price: $ $+ $FBS.PropPrice($1)      
     }
     else vcmp.msg 1 $2 Property info can't be found!
   }
   !inc %a
 }
}



Oh and delete every pickup in your config file - this is a MUST.

It should now function properly only thing I haven't fixed yet is when scripts are disconnected then reconnected the Properties fuck up by moving up an ID and showing Unknown as the Name.  So uh.. don't restart your server/scripts and you won't come across this problem :P

MrAcmering

the only mode to don't show the prop bug is  no prop ;)


YaY

MISHA123152

where can I download FBS v0.2.5? please give me link) please)))
Experience VCMP: 4 years.
Professional coder: gamemodes, filterscripts.

Only a Dude

Quote from: MISHA123152 on March 10, 2010, 05:09:21 PM
where can I download FBS v0.2.5? please give me link) please)))
Link removed man. Can't do anything for you

------------------------------------------------

some oral sex ^^

MISHA123152

you could give a reference to the normal FBS v0.2 with! buypropertys? please
Experience VCMP: 4 years.
Professional coder: gamemodes, filterscripts.

thijn



MISHA123152

you can make the assembly FBS v0.2 c buy houses? no bugs ... please and give me link))
Experience VCMP: 4 years.
Professional coder: gamemodes, filterscripts.

thijn



Tonys

Quote from: MISHA123152 on March 11, 2010, 05:32:50 PM
you can make the assembly FBS v0.2 c buy houses? no bugs ... please and give me link))

I posted a fix for it, although there is still one problem everytime the script is disconnected then connected the properties move up by 1 ID. Though if your only adding the FBS script and aren't making any changes to it then it will work perfectly.  Just replace the Property stuff in the script with the stuff I posted above.

MISHA123152

I tried. I did not work. give me a link to the normal FBS.mrc whose buyprop without bugs. please. or search for FBS v0.2.5. please. you are my last hope.
Experience VCMP: 4 years.
Professional coder: gamemodes, filterscripts.