Author Topic: Four NEW questions  (Read 6609 times)

0 Members and 1 Guest are viewing this topic.

szostol

  • Guest
Four NEW questions
« on: January 16, 2008, 02:57:41 pm »
       Hello, i'm new user but i had been looking here some times. My nicknames in game are Szostol and [KFJ]Skyman.
       I'm making own server European Best Server. I did map, settings and i modified GUS 10.0 in about 90% . I have some questions:

1. I wanna TDM and i did commands by wich you can heal your self in some places...
-Malibu - !buydrink
-Escobar - !buycake
-Downtown hospital - !buymedicine
- North Point Mall - !buycoffee

...and i don't know isn't it RPG so much? Delete this commands or not, what do you advise?

2. I don't know how to write auto-kick command after 3 drive-by?

3. How to write auto-ban command when use some not allowed weapons?

4. Is it possible to connect Rcon and my scripts in same moment? - Done
-----------------------------------------------------------------------------

                                         NEW QUESTIONS

1. How to make one command can work in maybe 4 definite places? As !buymedicine can work in 2 hospitals, chemistry etc.? I did 4 commands !buy(coffee/cake...) because i don't know how to do buymedicine cna work in 4 places.

2. How to do player lost money when die?

Code: [Select]
if ((%killer != Unknown) && (%victim != Unknown)) {
    vcmp.add.deaths %victim 1
    vcmp.cash- %victim $vcmp.cost(%victim)


Don't work maybe...  :P (i will try 2 time because i changed something

3. How can i send massege to player wich look like vcmp.announce?

4. I did command !lendcar it's same as !spawncar but !spawncar i did for free and for admins only and !lendcar cost 4000$ and is for normal players. My question is how to make only admins can spawn some special cars and if it's possible only admins can use it.












« Last Edit: January 17, 2008, 08:44:08 pm by szostol »

Juppi

  • Guest
Re: Four questions
« Reply #1 on: January 16, 2008, 05:46:40 pm »
I dont comment the first question, those who play more can tell their opinion.

For 2 and 3 i have simple solutions from old Ka server script, which uses the aliases from GUS (aliases are from GUS 9.00, but i think they should work in 10.00, too)

Auto-warn/kick code can be easily made using the alias vcmp.warn. The same alias is used in command !warn, so after getting three warns the player gets kicked. This should give you auto-warn after every DB:

Code: [Select]
on *:SIGNAL:vcmp.kill:{
  var %weapon = $iif($1 != $null,$1,Unknown) ;i think this is aready there; if not add it

...

    if (%weapon == 42) {    ;42 is the identifier number for drivebying
      vcmp.warn %killer Server Drive-bying

;this warns the killer, Server is the name of admin who gave the warn and Drive-bying is the reason for warn

    }
}

This doesnt include the warn given to teamkillers. In GUS 9 there aren't defined event for teamkilling, so we have to add it to alias vcmp.data (check if its in version 10, if not just add)

Code: [Select]
alias vcmp.data {
.....

  elseif ($1 == [teamkill]) {
    .signal vcmp.teamkill $5 $vcmp.getdeathinfo($4).name $vcmp.getdeathinfo($2).name
  }

.....
}

This makes a signal called vcmp.teamkill every time someone teamkills. Now we need to create the action for teamkilling. You can use the same warning system as in vcmp.kill, or add another, like direct kick after TK.

Code: [Select]
on *:SIGNAL:vcmp.teamkill:{
  var %weapon = $iif($1 != $null,$1,Unknown)
  var %victim = $iif($2 != $null,$vcmp.getid($2),Unknown)
  var %killer = $iif($3 != $null,$vcmp.getid($3),Unknown)

;these has to be here, this is new thing and needs its own definitions

  vcmp.warn %killer Server Teamkilling ; or just vcmp.kick %killer

}

If you dont want to mix the warns by !warn command and the warns from DB/TK, create new alias for drive-by warning. Easiest way is to copy all aliases related to vcmp.warn, and rename them eg. to vcmp.warn2.



3. can be quite similar, just create a ban system similar to the warn system. Put it inside on *:SIGNAL:vcmp.kill: and on *:SIGNAL:vcmp.teamkill:. Instead of DB's %weapon code just use the codes from the weapons that are forbidden, and instead of warning, use alias vcmp.ban.

Hope this helps  ;)

Ask if theres something to ask, there may also be typos  :P

szostol

  • Guest
Four NEW questions
« Reply #2 on: January 17, 2008, 06:21:14 pm »
Thank you very much  ;D Yea it helped me.

« Last Edit: January 17, 2008, 08:44:17 pm by szostol »

Offline mbalee

  • Street Thug
  • *
  • Posts: 32
    • View Profile
    • Hungarian GTA Site
Re: Four NEW questions
« Reply #3 on: January 20, 2008, 12:35:41 am »
Hai!

1. Edit the vcmp.data.ini file and do a copy from the sites. Grant the same name for the places.
Example:
Code: [Select]
-1587,1584,-1177,1584,-1177,1398,-1587,1398=buyplace
-1587,1348,-1177,1348,-1177,1145,-1587,1145=buyplace
-1587,1099,-1177,1099,-1177,896,-1587,896=buyplace
425.5647,884.1086=buyplace
402.3017,1013.3649=buyplace
...

2. I did it in this manner: :)
Code: [Select]
  if ((%victim != Unknown) && (%killer != Unknown)) {
    vcmp.add.kills %killer 1
    vcmp.add.cskills %killer 1
    vcmp.cash+ %killer $vcmp.reward(%killer)
    vcmp.cash- %victim $vcmp.rewardmin(%victim)

Create new cash alias! (reward and rewardmin)

3. GOOD IDEA! :D I use it. :P
Code: [Select]
  elseif ($2 == !anmsg) || ($2 == !pmanmsg) {
    if ($vcmp.cmdcheck(!anmsg,%id) == fail) !halt
    elseif ($4 == $null) vcmp.msg %id Error - Missing Information, $2 <name> <text>
    elseif (%a == -1) vcmp.msg %id Error - Invalid ID/Name
    else {
      vcmp.announce %a $4
    }
  }

4. Edit the vcmp.cmdlist.ini file.
 ex: !spawncar=10 ;number=level :D

I hope for it I helped! :)  Write if something is not good!!
What kind of commands do you have? Send to me in private. :) :P Thanks

Cya, Balee.
« Last Edit: January 20, 2008, 09:37:51 pm by mbalee »

Offline mbalee

  • Street Thug
  • *
  • Posts: 32
    • View Profile
    • Hungarian GTA Site
Re: Four NEW questions
« Reply #4 on: January 26, 2008, 02:22:33 pm »
hmmm...

Good?? Please write!

szostol

  • Guest
Re: Four NEW questions
« Reply #5 on: January 27, 2008, 10:32:49 pm »
Hi, sorry i haven't write but i was skiing for 8 days ^^ and i back today. I will check it later or tommorow because i'm tired.

Offline mbalee

  • Street Thug
  • *
  • Posts: 32
    • View Profile
    • Hungarian GTA Site
Re: Four NEW questions
« Reply #6 on: January 28, 2008, 06:30:04 pm »
WoW! :D

Okay! :)

szostol

  • Guest
Re: Four NEW questions
« Reply #7 on: January 28, 2008, 09:52:42 pm »
Ok i checked

1. I deleted that commands as buymedicine so I don't need to use it now, but i think it should work.

2. WORK!

3. WORK!

4. You don't understand me. I did two commands !lendcar and !spawncar they are the same but lendcar is for lvl 1 and it cost and spawncar is for admins and doesn't cost xD and I have problem to make  lvl1 couldn't use !lendcar 145 145=id of my favourite car wich I added only for my self to map.

------------------------------------------------------------------------------

                                                  NEW

1. How to make pm commands? I did !report but i want to make same as it's on LW /c report because it's very very good idea.

2. I have !brb <reason>, !anmsg <nick> <text> etc. and I have to do for example !anmsg szostol stop_spamming_on_chat and I wanna know how to make to don't need use some hyphens as " _ " so i wanna example !anmsg szostol stop spamming on chat

Offline Mex

  • Wiseguy
  • **
  • Posts: 63
    • View Profile
Re: Four NEW questions
« Reply #8 on: January 29, 2008, 04:21:44 am »
1. How to make pm commands? I did !report but i want to make same as it's on LW /c report because it's very very good idea.

If you're using the GUS script by Tommis the signal name for /c commands is 'vcmp.command2', so:

Code: [Select]
on *:SIGNAL:vcmp.command2:{
  ;$1 = nick or id, cant remember
  ;$2 = first word
}

I wanna know how to make to don't need use some hyphens as " _ " so i wanna example !anmsg szostol stop spamming on chat

Put a dash on the end of the $4 identifier, (or whichever identifier you are using to refer to the "text"), such as $4-
"$4-" is the same as "$4 $5 $6 $7 $8" etc etc, but in one identifier.

szostol

  • Guest
Re: Four NEW questions
« Reply #9 on: January 29, 2008, 02:07:28 pm »
1. I don't understand can you write all /c report command for me?

NORMAL CODE:

Code: [Select]
  }
  elseif (!report* iswm $2) || (!pmreport* iswm $2) {
    if ($vcmp.cmdcheck(!report,%id) == fail) !halt
    elseif (!$3) vcmp.msg %id Error - Missing Information, $2 <text>
    else {
      vcmp.msg %id You sent report, Thanks you for your support!
      !write vcmp.report.ini %name - $3-
    }
  }



2. Ok it work in !brb command, but where write it in !anmsg command?


Offline Mex

  • Wiseguy
  • **
  • Posts: 63
    • View Profile
Re: Four NEW questions
« Reply #10 on: January 29, 2008, 07:45:19 pm »
2. Ok it work in !brb command, but where write it in !anmsg command?

Change
Code: [Select]
vcmp.announce %a $4to
Code: [Select]
vcmp.announce %a $4-
1. I don't understand can you write all /c report command for me?

Code: [Select]
on *:SIGNAL:vcmp.command2:{
  var %name = $1, %id = $vcmp.getid(%name)
  if (!report* iswm $2) || (!pmreport* iswm $2) {
    if ($vcmp.cmdcheck(!report,%id) == fail) !halt
    elseif ($4 == $null) vcmp.msg %id Error - Missing Information, $2 <name> <reason>
    else {
      vcmp.msg %id You sent report, Thanks you for your support!
      !write vcmp.report.ini $vcmp.name(%a) - $4-
    }
  }
}

If that doesn't work try replacing
Code: [Select]
  var %name = $1, %id = $vcmp.getid(%name)with
Code: [Select]
  var %id = $1, %name = $vcmp.name(%id)

Offline Force

  • LU Developer
  • Made Man
  • *
  • Posts: 242
    • View Profile
Re: Four questions
« Reply #11 on: May 04, 2008, 12:08:01 am »
I dont comment the first question, those who play more can tell their opinion.

For 2 and 3 i have simple solutions from old Ka server script, which uses the aliases from GUS (aliases are from GUS 9.00, but i think they should work in 10.00, too)

Auto-warn/kick code can be easily made using the alias vcmp.warn. The same alias is used in command !warn, so after getting three warns the player gets kicked. This should give you auto-warn after every DB:

Code: [Select]
on *:SIGNAL:vcmp.kill:{
  var %weapon = $iif($1 != $null,$1,Unknown) ;i think this is aready there; if not add it

...

    if (%weapon == 42) {    ;42 is the identifier number for drivebying
      vcmp.warn %killer Server Drive-bying

;this warns the killer, Server is the name of admin who gave the warn and Drive-bying is the reason for warn

    }
}

This doesnt include the warn given to teamkillers. In GUS 9 there aren't defined event for teamkilling, so we have to add it to alias vcmp.data (check if its in version 10, if not just add)

Code: [Select]
alias vcmp.data {
.....

  elseif ($1 == [teamkill]) {
    .signal vcmp.teamkill $5 $vcmp.getdeathinfo($4).name $vcmp.getdeathinfo($2).name
  }

.....
}

This makes a signal called vcmp.teamkill every time someone teamkills. Now we need to create the action for teamkilling. You can use the same warning system as in vcmp.kill, or add another, like direct kick after TK.

Code: [Select]
on *:SIGNAL:vcmp.teamkill:{
  var %weapon = $iif($1 != $null,$1,Unknown)
  var %victim = $iif($2 != $null,$vcmp.getid($2),Unknown)
  var %killer = $iif($3 != $null,$vcmp.getid($3),Unknown)

;these has to be here, this is new thing and needs its own definitions

  vcmp.warn %killer Server Teamkilling ; or just vcmp.kick %killer

}

If you dont want to mix the warns by !warn command and the warns from DB/TK, create new alias for drive-by warning. Easiest way is to copy all aliases related to vcmp.warn, and rename them eg. to vcmp.warn2.



3. can be quite similar, just create a ban system similar to the warn system. Put it inside on *:SIGNAL:vcmp.kill: and on *:SIGNAL:vcmp.teamkill:. Instead of DB's %weapon code just use the codes from the weapons that are forbidden, and instead of warning, use alias vcmp.ban.

Hope this helps  ;)

Ask if theres something to ask, there may also be typos  :P

I have been looking for that sort of thing :) Where in the standard GUS 9 script would it go?

Also, how do I make a killingspree script and do something like /announce or an announce command for a killingspree etc?

Hope that is clear enough?

Cheers