Author Topic: Few Things in 1 Topic :P  (Read 6329 times)

0 Members and 2 Guests are viewing this topic.

Offline Jack_Bauer

  • Wiseguy
  • **
  • Posts: 58
  • GTA:MP Clan Revolution
    • View Profile
    • Battlefield Vice City
Few Things in 1 Topic :P
« on: June 24, 2008, 05:39:00 am »
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
Code: [Select]
elseif ($2 == !time) vcmp.adminchat $currenttime
Code: [Select]
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.

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



Offline Jack_Bauer

  • Wiseguy
  • **
  • Posts: 58
  • GTA:MP Clan Revolution
    • View Profile
    • Battlefield Vice City
Re: Few Things in 1 Topic :P
« Reply #1 on: June 27, 2008, 05:55:05 am »
nobody can help me ?  :'( :'( :'( :'(



Offline bakasan

  • VC:MP Developer
  • Made Man
  • *
  • Posts: 169
    • View Profile
Re: Few Things in 1 Topic :P
« Reply #2 on: June 27, 2008, 08:06:10 am »
1- sansan has stuff like this:
Code: [Select]
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:
Code: [Select]
elseif ($2 == !announce) vcmp.gametext.all $3-
after lookin at it closer, i realised u may need to edit the alias like this:
Code: [Select]
alias vcmp.doforall {
  var %k = 0
  while (%k < %max_players) {
    if ($vcmp.nameid(%k) != $null) { $$1 %k $2- }
    !inc %k
  }
}
and
Code: [Select]
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
Code: [Select]
elseif ($2 == !time) vcmp.adminchat $currenttimethen the alias $currenttime also has it:
Code: [Select]
alias currenttime vcmp.adminchat $asctime(HH:mm)
so right off to prevent crashes or weirdness try just using:
Code: [Select]
elseif ($2 == !time) vcmp.adminchat $asctime(HH:mm)
as for the timezone for gmt+1 !time command, u might just try this:
Code: [Select]
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.


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.

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

Offline Jack_Bauer

  • Wiseguy
  • **
  • Posts: 58
  • GTA:MP Clan Revolution
    • View Profile
    • Battlefield Vice City
Re: Few Things in 1 Topic :P
« Reply #3 on: June 27, 2008, 07:30:06 pm »
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"



Offline Jack_Bauer

  • Wiseguy
  • **
  • Posts: 58
  • GTA:MP Clan Revolution
    • View Profile
    • Battlefield Vice City
Re: Few Things in 1 Topic :P
« Reply #4 on: June 28, 2008, 08:38:16 am »
sorry for double post,this is what i have up to now:

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



Offline bakasan

  • VC:MP Developer
  • Made Man
  • *
  • Posts: 169
    • View Profile
Re: Few Things in 1 Topic :P
« Reply #5 on: June 28, 2008, 09:59:36 am »
Code: [Select]
;--- hop and higher commands
    elseif ($1 == !announce) vcmp.gametext.all $3-

I obviosly have something wrong,but dont know what.

maybe try something like:
Code: [Select]
;--- hop and higher commands
    elseif ($1 == !announce) {
      vcmp.echo Announcing: $2-
      vcmp.gametext.all $2-
    }





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

sorry there was a typo in the other version, so try this:
Code: [Select]
elseif ($2 == !time) vcmp.adminchat GMT + 1 Time: $asctime($calc($gmt + 3600),HH:mm)



Offline Jack_Bauer

  • Wiseguy
  • **
  • Posts: 58
  • GTA:MP Clan Revolution
    • View Profile
    • Battlefield Vice City
Re: Few Things in 1 Topic :P
« Reply #6 on: June 29, 2008, 02:26:48 am »
pitty they are not working,weird. . . ill post if i get the solution,appreciate your help Sir. Bakasan



Offline TanaX01

  • Made Man
  • ***
  • Posts: 214
  • BlackList! <3
    • View Profile
Re: Few Things in 1 Topic :P
« Reply #7 on: June 29, 2008, 08:15:09 am »
jack you help in !time you help me  :o