Vice City Multiplayer

VC:MP 0.3 => mIRC/pawn Scripting => Topic started by: thijn on August 26, 2008, 04:45:53 pm

Title: !bikers etc.
Post by: thijn on August 26, 2008, 04:45:53 pm
I have this code:
Code: [Select]
  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?
Title: Re: !bikers etc.
Post by: ReVilo on August 26, 2008, 04:47:54 pm
That's what you tell it to say
Code: [Select]
vcmp.say The follow players are using the Biker skin:
Title: Re: !bikers etc.
Post by: Force on August 26, 2008, 05:55:37 pm
Seen my amazing commands haven't we? :P

Try this:

Code: [Select]
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.
Title: Re: !bikers etc.
Post by: thijn on August 26, 2008, 06:00:20 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 ;)
Title: Re: !bikers etc.
Post by: Force on August 26, 2008, 06:06:27 pm
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.
Title: Re: !bikers etc.
Post by: thijn on August 26, 2008, 09:29:29 pm
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??
Title: Re: !bikers etc.
Post by: bazza on August 26, 2008, 10:19:47 pm
FBS scripts = STAY AWAY FROM THEM! crashing all the time.
Title: Re: !bikers etc.
Post by: Force on August 26, 2008, 10:20:01 pm
Woah.....shiz cakes :x

* [SDT]F_T_F0RC3 goes to try and fix it

Code: [Select]
 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,
Code: [Select]
while (%a <= 50) became the maximum number of players the server can hold. An example would be:
Code: [Select]
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:

Code: [Select]
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:

Code: [Select]
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
    }
  }
}
Title: Re: !bikers etc.
Post by: bazza on August 27, 2008, 12:28:48 am

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.
Title: Re: !bikers etc.
Post by: VRocker on August 27, 2008, 01:51:49 am
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:
Code: [Select]
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
Title: Re: !bikers etc.
Post by: Force on August 27, 2008, 02:06:49 am
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?
Title: Re: !bikers etc.
Post by: bazza on August 27, 2008, 02:13:14 am
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.
Title: Re: !bikers etc.
Post by: VRocker on August 27, 2008, 02:21:59 am
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? ;)
Title: Re: !bikers etc.
Post by: bazza on August 27, 2008, 02:27:10 am
no, your right, i made a typo but corrected it.
Title: Re: !bikers etc.
Post by: Windlord on August 27, 2008, 02:25:08 pm
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!
Title: Re: !bikers etc.
Post by: bazza on August 27, 2008, 02:36:35 pm
1) he should think twice before posting scripts that dont work!

2) he should not boast about scripts that dont work ! <-- this is the one i believe offended most people

3) before you make irrelevent comments to stand up for your "internet friend" please consider points 1 and 2

EDIT:

4) not once has he taken responsibility for his mistakes, in both his comments he has "passed the blame" onto someone / something else.


this brings me nicely on to point 5.

5) a bad scripter will always make excuses!

just admit you made a error, your a beginner and made a mistake (theres nothing wrong with that) and STOP boasting about your scripts.
Title: Re: !bikers etc.
Post by: Force on August 27, 2008, 03:23:51 pm
Ok, A) I was trying to help thijn, and I had no resources around so I did the best I could.

B) When I saw it didnt work, I then went on to post the corrected and working version.

C) I never "boasted" when I said "You have seen my awesome commands then :P". The :P was put there for a reason, it was to say that I'm saying this in a joke way. Thijn himself even called them awesome when he was on my server.

D) If you think I'm a bad scripter then fair enough, You say you have been scripting for 2 years, but you have never posted a script to help someone, also, I wouldn't have released FBS unless they were bug free, which they aren't as NO script will be without bugs no matter how hard you try. And so, that is why I released them as they are.

Finally, about passing the blame onto someone else, I was stating a fact that VRockers DLL caused it to crash and VRocker clarified that.

Thijn: I think it would be best if you locked/ deleted this topic for both yourself and others.
Title: Re: !bikers etc.
Post by: GOLG on August 27, 2008, 04:22:49 pm
yes i saw what he put

someone wrote , "cool, the new wsv  is out"

[SDT]F_T_F0RC3 wrote, "use mine, their better"

i agree, [SDT]F_T_F0RC3  should not be allowed to help in the forum.
Title: Re: !bikers etc.
Post by: Force on August 27, 2008, 04:30:06 pm
Sheez, I said that as a joke, AND explained later on that I had said that with a :P to say that WSV is MILES BETTER but its nice to see someone using your own scripts being used.

And to be frankly honest, the last time I saw [SDT]F_T_F0RC3 was a loooooong time ago.

Just stop spamming up the forums, I made a mistake ok, I posted some wrong code, big woppty do. :-\

And also, BOTH me and VRocker posted a solution, I posted one, saw it didnt work, posted another, then VRocker posted one as well. And, VRocker's will work better than mine as he is older and wiser in scripting than I am.
Title: Re: !bikers etc.
Post by: thijn on August 27, 2008, 04:31:54 pm
Why are you all talking so stupid about [SDT]F_T_F0RC3 ??? ???
Hes nice and he tries to help me (A beginner) with a script.

Quote
Thijn himself even called them awesome when he was on my server.
This is correct, i liked the script because its easy to understand and it got a lots of cool commands.

Quote
1) YOU ARE GOING TO BOAST ABOUT SCRIPTS THAT DONT WORK
The script (FBS) works for me ;) Maby you are a noob and can get it work :D Im a beginner but i got it worked ;)

BTW i lock the topic because i got my answer.
And plz be nice to my friend [SDT]F_T_F0RC3 :)
Title: Re: !bikers etc.
Post by: maxorator on August 27, 2008, 07:49:06 pm
I cleaned this up a bit. Most of the posts not related to the topic were deleted.

Bazzaa, K.I.S.S, try to be more tolerant. TanaX, no spam, please.