• Welcome to Vice City Multiplayer.
 

Few Things in 1 Topic :P

Started by Jack_Bauer, June 24, 2008, 03:39:00 AM

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

Jack_Bauer

thanks in advance,i would like to know more by myself but,im erm a noob at scripting at the moment .  >:( :'(   Im using Sansan

1?- I would need/like the "announce" command,i look in script and i start to see how it works but i cant kind of set all up together, i know i use vcmp.gametext,but i dont know how to make command from there :S.

2?- Can mIRC make sums? i think ive seen it somewhere,to start with i want to use it for the time command,as it gives my time so i would do like,im from spain,GMT +1,so like england would be $currenttime minus 1.im not sure why but my !time command crashes,it works at start but then it get stuck at that hour,like,i type !time and it comes 3:00 ,half hour latter i do !time and it still comes up 3:00 :S
elseif ($2 == !time) vcmp.adminchat $currenttime
alias currenttime vcmp.adminchat $asctime(HH:mm)

3?- i cant get to work some cars on the config.ini file,cars like phoenix , which is weird couse i see it on other servers :S. Skin 130 also doesnt work I put like

Skin = 1 130 etc etc etc
Skin = 1 103   "     "    "

and two 103's skins comes up,one with 103's weapons and the other with 130's weapons :S.

4?-I managed to find out how to disable the auto-enter in vehicle when you do !getcar,but now it spawns on me,anyway of making it spawn a bit on one side,i think with a "sum"  it would do the trick like add 5 to the coordinates or something.

elseif ($2 == !getcar) {
      if ($hget(vcmp,loggedin. $+ %id) < 10) vcmp.adminmsg %id You must be Admin Level 10 or higher to attempt this command.
      else {
        if ($vcmp.hgetcarid(%id) != 0) vcmp.adminmsg %id You must not be in a vehicle to use !getcar.
        else {
          if ((!$3) || ($3 > 200) || ($3 < 0)) vcmp.adminmsg %id Error: Invalid Car ID.
          else {
            vcmp.setloc %id $vcmp.hgetpos.x(%id) $vcmp.hgetpos.y(%id) $vcmp.hgetpos.z(%id) 0
            vcmp.setcarloc $3 $vcmp.hgetpos.x(%id) $vcmp.hgetpos.y(%id) $vcmp.hgetpos.z(%id)
[b];[/b]            vcmp.setcar %id $3
            vcmp.adminmsg %id Got car $3 $+ !
          }



I think thats it for now,thank you all very much.



Jack_Bauer




bakasan

1- sansan has stuff like this:
alias vcmp.gametextpm.all vcmp.doforall vcmp.gametextpm $$1 $$2 $$3-
alias vcmp.gametext.all vcmp.doforall vcmp.gametext $$1 $$2-
alias vcmp.adminmsg.all vcmp.doforall vcmp.adminmsg $$1 $$2-
alias vcmp.team.gametextpm vcmp.team.doforall vcmp.gametextpm $$1 $$2 $$3-
alias vcmp.team.adminmsg vcmp.team.doforall vcmp.adminmsg $$1 $$2-

which should make it fairly easy to make some announce type commands such as:
elseif ($2 == !announce) vcmp.gametext.all $3-

after lookin at it closer, i realised u may need to edit the alias like this:

alias vcmp.doforall {
  var %k = 0
  while (%k < %max_players) {
    if ($vcmp.nameid(%k) != $null) { $$1 %k $2- }
    !inc %k
  }
}

and

alias vcmp.gametext.all vcmp.doforall vcmp.gametext $$1-
alias vcmp.adminmsg.all vcmp.doforall vcmp.adminmsg $$1-

to get it to work correctly
obviously vcmp.adminmsg.all is a bit redundant, since u could just do vcmp.adminmsg ...  those functions may not have been tested and were probably aimed more at sansan "modes" but should be close to working


2- ur code calls vcmp.adminchat twice technically
elseif ($2 == !time) vcmp.adminchat $currenttime
then the alias $currenttime also has it:
alias currenttime vcmp.adminchat $asctime(HH:mm)

so right off to prevent crashes or weirdness try just using:
elseif ($2 == !time) vcmp.adminchat $asctime(HH:mm)

as for the timezone for gmt+1 !time command, u might just try this:
elseif ($2 == !time) vcmp.adminchat $asctime(($calc($gmt + 3600),HH:mm)
$gmt + 3600 (the number of seconds in an hour - 60 * 60)
theres probably a better way but that should work i figure (not tested tho)


3- not sure what that is all about, some skins are flaky and dont always work correctly.  generally if u use all skins below around 108, or all skins above 108, it usually works as expected.


Quote from: Jack_Bauer on June 24, 2008, 03:39:00 AM
4?-I managed to find out how to disable the auto-enter in vehicle when you do !getcar,but now it spawns on me,anyway of making it spawn a bit on one side,i think with a "sum"  it would do the trick like add 5 to the coordinates or something.

elseif ($2 == !getcar) {
      if ($hget(vcmp,loggedin. $+ %id) < 10) vcmp.adminmsg %id You must be Admin Level 10 or higher to attempt this command.
      else {
        if ($vcmp.hgetcarid(%id) != 0) vcmp.adminmsg %id You must not be in a vehicle to use !getcar.
        else {
          if ((!$3) || ($3 > 200) || ($3 < 0)) vcmp.adminmsg %id Error: Invalid Car ID.
          else {
            vcmp.setloc %id $vcmp.hgetpos.x(%id) $vcmp.hgetpos.y(%id) $vcmp.hgetpos.z(%id) 0
            vcmp.setcarloc $3 $vcmp.hgetpos.x(%id) $vcmp.hgetpos.y(%id) $vcmp.hgetpos.z(%id)
[b];[/b]            vcmp.setcar %id $3
            vcmp.adminmsg %id Got car $3 $+ !
          }



hmm maybe try

elseif ($2 == !getcar) {
      if ($hget(vcmp,loggedin. $+ %id) < 10) vcmp.adminmsg %id You must be Admin Level 10 or higher to attempt this command.
      else {
        if ($vcmp.hgetcarid(%id) != 0) vcmp.adminmsg %id You must not be in a vehicle to use !getcar.
        else {
          if ((!$3) || ($3 > 200) || ($3 < 0)) vcmp.adminmsg %id Error: Invalid Car ID.
          else {
            vcmp.setloc %id $vcmp.hgetpos.x(%id) $vcmp.hgetpos.y(%id) $calc($vcmp.hgetpos.z(%id) + 1.5) 0
            vcmp.setcarloc $3 $vcmp.hgetpos.x(%id) $vcmp.hgetpos.y(%id) $vcmp.hgetpos.z(%id)
            ;vcmp.setcar %id $3
            vcmp.adminmsg %id Got car $3 $+ !
          }

to make the player kinda on top of the car or something..

or else maybe just something like

          if ((!$3) || ($3 > 200) || ($3 < 0)) vcmp.adminmsg %id Error: Invalid Car ID.
          else {
            vcmp.setloc %id $vcmp.hgetpos.x(%id) $vcmp.hgetpos.y(%id) $vcmp.hgetpos.z(%id) 0
            vcmp.setcarloc $3 $vcmp.hgetpos.x(%id) $calc($vcmp.hgetpos.y(%id) + 2.5) $vcmp.hgetpos.z(%id)
            ;vcmp.setcar %id $3
            vcmp.adminmsg %id Got car $3 $+ !
          }


hope that helps some

Jack_Bauer

first thing i said even i was on my own in my room was "COOOL!!!" when i saw your name on the "last message thing" on this topic,freaking awesome man,thx a lot.

1.- Works Fine,ill try and see if i can do it from irc,if not,i think i know where i have to look for it.

2.- Not Working but i think i know what to do.

4.- ok it spawns a bit further north as i saw here. ($vcmp.hgetpos.z(%id) + 1.5) but its still not enough so ill change it to probably $vcmp.hgetpos.z(%id) + 3.0),see if it works,thx a lot,ill post here if theres still anything "buggy"



Jack_Bauer

sorry for double post,this is what i have up to now:

1.- elseif ($2 == !announce) $iif($hget(vcmp,loggedin. $+ %id) < 5,vcmp.adminmsg %id You must be Admin Level 5 or higher to attempt this command.,vcmp.gametext.all $3-)

This Works Fine,but im stuck with adding it to the echo commands,so i can "announce" from IRC.
;--- hop and higher commands
    elseif ($1 == !announce) vcmp.gametext.all $3-


I obviosly have something wrong,but dont know what.


2.- time command doesnt work,ill try work on it more tomorrow i left it like this :
elseif ($2 == !time) vcmp.adminchat GMT + 1 Current Date/Time $asctime


4.- Very proud of this,all due to respect to bakasan but i would recommend this.
elseif ($2 == !getcar) {
      if ($hget(vcmp,loggedin. $+ %id) < 5) vcmp.adminmsg %id You must be Admin Level 5 or higher to attempt this command.
      else {
        if ($vcmp.hgetcarid(%id) != 0) vcmp.adminmsg %id You must not be in a vehicle to use !getcar.
        else {
          if ((!$3) || ($3 > 200) || ($3 < 0)) vcmp.adminmsg %id Error: Invalid Car ID.
          else {
            vcmp.getloc $vcmp.hgetpos.x(%id) $vcmp.hgetpos.y(%id) $vcmp.hgetpos.z(%id) 0
            vcmp.setcarloc $3 $vcmp.hgetpos.x(%id) $calc($vcmp.hgetpos.y(%id) + 3.5) $calc($vcmp.hgetpos.z(%id) - 1.0)
            ;vcmp.setcar %id $3
            vcmp.adminmsg %id Got car $3 $+ !
          }


Thanks in advance for the possible help . . .



bakasan

Quote from: Jack_Bauer on June 28, 2008, 06:38:16 AM
;--- hop and higher commands
    elseif ($1 == !announce) vcmp.gametext.all $3-


I obviosly have something wrong,but dont know what.

maybe try something like:

;--- hop and higher commands
    elseif ($1 == !announce) {
      vcmp.echo Announcing: $2-
      vcmp.gametext.all $2-
    }




Quote from: Jack_Bauer on June 28, 2008, 06:38:16 AM


2.- time command doesnt work,ill try work on it more tomorrow i left it like this :

elseif ($2 == !time) vcmp.adminchat GMT + 1 Current Date/Time $asctime


sorry there was a typo in the other version, so try this:

elseif ($2 == !time) vcmp.adminchat GMT + 1 Time: $asctime($calc($gmt + 3600),HH:mm)




Jack_Bauer

pitty they are not working,weird. . . ill post if i get the solution,appreciate your help Sir. Bakasan



TanaX01

jack you help in !time you help me  :o