• Welcome to Vice City Multiplayer.
 

Skin System - [FBS Add-On]

Started by Tonys, March 11, 2010, 08:30:01 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Tonys

It's easy as hell to add in more if you have some common sense.


So firstly you want to add this - at on *:SIGNAL:vcmp.player.spawn:{ -
timer 1 1 FBS.Skins $1 $2

Once you have done this just paste in this alias -
alias FBS.Skins {
 if (Cop Skin isin $FBS.Buildings($1, $2)) {
   vcmp.msg $1 $2 You are now a Cop.
   hadd -m vcmp.skins $vcmp.name($1, $2) Cop
 }
}


So of course you will need the coordinates for the FBS.Buildings.ini file so here they are -
393.1723,-474.4701,396.0532,-476.448,393.5086,-479.812,390.7947,-477.5717=Cop Skin

Finally here is the !skin command -
 elseif ($3 == skin) {
   if (!$4) {
     vcmp.say $1 ** $vcmp.name($1, $2) is currently using the $hget(vcmp.skins,$vcmp.name($1, $2)) skin.
   }
   elseif ($4) {
     if ($vcmp.name($1, $FBS.ID($4)) == Unknown) vcmp.msg $1 $2 Invalid Nick-Name
     else {
       vcmp.say $1 ** $vcmp.name($1, $FBS.ID($4)) is currently using the $hget(vcmp.skins,$vcmp.name($1, $FBS.ID($4))) skin.
     }
   }
 }


If you want to see how to use the Skin system to greater use like maybe in a Cops & Robbers thing I might post that.


thijn

Not correct.
You'll have to use 2 timers for this.
The first timer will load the FBS.Skins alias before the timer is really done.
So the area is not up-to-date. If you use 2 timers, This will solve the problem:
Also, You're using $FBS.Buildings at every If statement (at least, I think so as you don't use a variable), This will call the INI file a lot, So will produce lagg.

on *:SIGNAL:vcmp.player.spawn:{
.timer -m 1 500 FBS.Before.Skins $1 $2
}

alias FBS.Before.Skins {
.timer -m 1 500 FBS.Skins $1-
}
alias FBS.Skins {
var %area = $FBS.Buildings($1, $2)
  if (Cop Skin isin %area) {
    vcmp.msg $1 $2 You are now a Cop.
    hadd -m vcmp.skins $vcmp.name($1, $2) Cop
  }
}


Hope i didn't maked any mistakes, as I didn't tested it.


Skirmant

#2
And if you want it to detect your skins a few milliseconds faster, you can try detecting skins by heights.
Find out the Z of the cop spawn. Which is 14 if rounded up on the second floor.

Example: if ($round($FBS.location($1,$2).z,0) == 14) FBS.msg $1 $2 You're a damn cop.
I know advance mIRC, average C++, basic Pawn & Squirrel, very basic Java Script.