• Welcome to Vice City Multiplayer.
 

!bikers etc.

Started by thijn, August 26, 2008, 03:45:53 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

thijn

I have this code:

  elseif ($2 == !bikers) {
  var %a = 0
  vcmp.say The follow players are using the Biker skin:
    while (%a <= 50) {
if ($vcmp.skin($vcmp.name(%a)) == Biker) vcmp.say $vcmp.name(%a)
      }
      !inc %a
  }

But when i do !bikers
it only says:
Quote
The follow players are using the Biker skin:
When i go to mIRC i see this error:
Quote
* /      if: not connected to server (line 1679, gus.mrc)
why??? and how can i fix it?


ReVilo

That's what you tell it to say
vcmp.say The follow players are using the Biker skin:

Force

Seen my amazing commands haven't we? :P

Try this:


elseif ($2 == !bikers) {
  var %a = 0
  while (%a <= 50) {
    if ($vcmp.skin($vcmp.name(%a)) == Biker) {
      if (%b) var %b = %b $vcmp.name(%a)
      elseif (!%b) var %b = %b $vcmp.name(%a)
    }
    if (%b) vcmp.say Players using the biker skin are: %b
    else vcmp.say No players are using the bikers skin
  }
  !inc %a
}


That is roughly what it should like like, thanks to wind for the %b variables in WSV :) it makes it look so neat in game.

thijn

Quote from: [SDT]F_T_F0RC3 on August 26, 2008, 04:55:37 PM
Seen my amazing commands haven't we? :P
Yes i did, but i was meking it to (before i saw it on ur server) but my area didnt work  :'( So i didnt maked it. Untill i saw it on ur server, and when u said u maked with the area, i thought: I can make it to! So now its working.
I saw the !bikers thing on rpg servers, so its basicly based from them, but u maked me doing it :P :P

Anyway thanks for u code, it works now ;)


Force

Lol, Thats good to here, a little tip would be to look at the released scripts, and convert code from there if you feel that it is what you are looking for, seems to have worked in this case as you have turned FBS and WSV into GUS.

thijn

WTF, Ur code dont work, i get no error but:

Quote
3*CC.*Thijn has joined the Game.
5Administrator *CC.*Thijn Auto-Logged In (Admin Level: 10)
5>> spawned
5>> *CC.*Thijn spawned
14*CC.*Thijn: !bikers
5Players using the biker skin are: 0 *CC.*Thijn
5Players using the biker skin are: 0 *CC.*Thijn *CC.*Thijn
5Players using the biker skin are: 0 *CC.*Thijn *CC.*Thijn *CC.*Thijn
5Players using the biker skin are: 0 *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn
5Players using the biker skin are: 0 *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn
5Players using the biker skin are: 0 *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn
5Players using the biker skin are: 0 *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn
5Players using the biker skin are: 0 *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn
5Players using the biker skin are: 0 *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn
5Players using the biker skin are: 0 *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn
5Players using the biker skin are: 0 *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn
5Players using the biker skin are: 0 *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn
5Players using the biker skin are: 0 *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn
5Players using the biker skin are: 0 *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn
5Players using the biker skin are: 0 *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn
5Players using the biker skin are: 0 *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn
5Players using the biker skin are: 0 *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn
5Players using the biker skin are: 0 *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn *CC.*Thijn
And so much lines, but thats to much to post ;)
Is something wrong with the cmd??


bazza

FBS scripts = STAY AWAY FROM THEM! crashing all the time.

Force

#7
Woah.....shiz cakes :x

* [SDT]F_T_F0RC3 goes to try and fix it


 elseif ($2 == !Bikers) {
   var %a = 0
   while (%a <= 50) {
     if ($vcmp.skin($vcmp.name(%a)) == Biker) && ($vcmp.name(%a) != Unknown) {
       if (%b) var %b = %b $vcmp.name(%a) -
       elseif (!%b) var %b = %b $vcmp.name(%a) -
     }
     !inc %a
   }
   if (%b) vcmp.say $1 ** The following are using the Biker Skin: %b
   else vcmp.say $1 ** No one is using the Biker Skin.
 }


Note: It's preferable that the 50 in, while (%a <= 50) became the maximum number of players the server can hold. An example would be: while (%a <= 16)

Edit:-

Bazza, that is nothing to do with me, its the DLL that VRocker created, its not very stable, a better, more stable one will be released with FBS 0.2. ;)

Edit 2:-

Bazza, If they are crashing on connect then its because your config has teams in it with a weapon slot which is 0.

To fix this, change:


alias FBS.parseline {
  if (($len($2-) > 0) && ($left($2,1) != $chr(59)) && ($chr(91) !isin $2)) {
    if ($2 == Class) {
      FBS.AddClass 1 %FBS.classes $3-
      !inc %FBS.classes
    }
    elseif ($2 == Vehicle) {
      FBS.AddVehicle 1 %FBS.vehicles $3-
      !inc %FBS.vehicles
    }
  }
}


To:


alias FBS.parseline {
  if (($len($2-) > 0) && ($left($2,1) != $chr(59)) && ($chr(91) !isin $2)) {
    if ($2 == Vehicle) {
      FBS.AddVehicle 1 %FBS.vehicles $3-
      !inc %FBS.vehicles
    }
  }
}

bazza

#8
Quote from: [SDT]F_T_F0RC3 on August 26, 2008, 09:20:01 PM

Bazza, that is nothing to do with me, its the DLL that VRocker created, its not very stable, a better, more stable one will be released with FBS 0.2. ;)

Bazza, If they are crashing on connect then its because your config has teams in it with a weapon slot which is 0.


I didnt say that did i !!

you are a n00b scripter [SDT]F_T_F0RC3 and your scripts dont work properly !!

i have been scripting for 2 years, and from experience allot of your script will cause processor lag.

DONT BOAST WHEN YOU DONT KNOW WHAT YOU ARE TALKING ABOUT [SDT]F_T_F0RC3 !!

I STRONGLY ADVISE PEOPLE TO STAY AWAY FROM [SDT]F_T_F0RC3'S  BEGINNER SCRIPTS !!

Edit by Max: Please respect other board members.

VRocker

#9
Yes, Force is a beginner at scripting but hes learning!
Yes his loops are a bit inefficient but wern't yours when you first started out? i know mine were!

I've talked to Force and gave him pointers on improving his scripts and i offer help to anybody that asks me. And yes, the FBS scripts were a bit crashy which was partly down to my DLL (which i recently fixed).

Anyway back on track... Force was on the right lines with his loop (shame he cocked it up a bit) so dont have a go at him

Oh and thijn, a few things with your code... i notice you have a Tab in you code you posted (Tabs are VERY bad in mirc code, dont use notepad :))

Heres the fix you want:
elseif ($2 == !bikers) {
    var %a = 0, %b
    while (%a <= 50) {
      if ($vcmp.skin($vcmp.name(%a)) == Biker) {
        if ( %b ) %b = %b $+ , $vcmp.name(%a)
        else %b = $vcmp.name( %a )
        !inc %a
      }
    }
    vcmp.say The follow players are using the Biker skin:
    vcmp.say %b
  }


And before anybody bitchs about an inefficient loop... I dont know the alias in GUS which gets the ammount of players in the server, or the maximum ammount of players allowed


Force

Umm ok, You think that then, maybe provide links to my nooooooob posts?

I'm trying to help here, and yes, scripters have bad days and produce bad scripts like the one that happened earlier, scripters are not super human you know. Have you ever tried remembering a loop like that off the top of your head once you have only just learnt how loops work?

bazza

#11
this post looks like a noob enought post to me.

a bad scripter will always make excuses.

[SDT]F_T_F0RC3, i have been scripting for 2 years, loops are not difficult.

DONT BOTHER HELPING IF;

1) YOU ARE GOING TO BOAST ABOUT SCRIPTS THAT DONT WORK

2) YOU DONT HAVE A CLUE WHAT YOU ARE DOING

3) YOU ARE N0000000000000B !!!

Edit by Max: Please respect other board members.

VRocker

#12
bazza, i suggest you calm down and stop flaming somebody for trying to help.
I dont see you helping thijn and if your such a good scripter, why not?

Everybody has to start somewhere. You was a beginner once! and loops can be difficult for some people or extremely easy for others. We arn't all the same.

Ok, i agree that force shouldn't be making scripts up off the top of his head to help others without first testing as hes a beginner but hey, he tried which counts for something.

Oh and on a side note... Who taught you to count... 1... 2.... 4!? Or did somebody eat point 3? ;)


bazza

no, your right, i made a typo but corrected it.

Windlord

I've known FoRcE for a while and it is shocking to see him being treated in such a way.

1. Calling others noobs publicly is a noobish act!
2. Unlike numerous posters and "scripters" FoRcE has never once asked for others to create whole scripts for him.

We've all been beginners and none of us are perfect.
This topic and the flamers, spammers of this topic have been extremely inconsiderate to the readers of this thread and most of all to FoRcE.

I'd also like to say that FoRcE is better than many of those on this forum ;)
Keep it going!