Author Topic: Help With Pickups  (Read 15306 times)

0 Members and 2 Guests are viewing this topic.

Offline Amenine

  • Street Thug
  • *
  • Posts: 47
  • [UCG]Clan Leader -Scripter/Fighter/XE MoD-
    • View Profile
    • UCG
Re: Help With Pickups
« Reply #15 on: January 02, 2009, 04:30:49 pm »
Code:
Code: [Select]
on *:SIGNAL:vcmp.pickup:{
  var %name = $vcmp.name($1)
  var %name2 = $replace($replace($vcmp.name($1),[,~),],~)
  var %id = $1



  if ($3 == 337) {
    set %a $rand(100,200)
    vcmp.cash+ %id %a
    vcmp.msg %id Picked Up Cash - Amount: $ $+ %a $+ , Location: $vcmp.area(%id)
  }
  elseif ($3 == 382) {
    if (Location-Name !isin $vcmp.area(%b)) {
      vcmp.announce %id Lap 1
      vcmp.msg %id Lap 1 completed Hurry to the next lap..
    }
  }
  elseif ($3 == 382) {
    if (Location-Name !isin $vcmp.area(%b)) {
      vcmp.announce %id Lap 2
      vcmp.msg %id Lap 2 completed Hurry to the next lap..
    }
  }

Note:Untested

Regards
Amenine
« Last Edit: January 02, 2009, 06:23:39 pm by Amenine »

Offline thijn

  • LU testers
  • VC:MP Veteran
  • *
  • Posts: 667
  • Im proud to be pro.
    • View Profile
    • Vice Underdogs
Re: Help With Pickups
« Reply #16 on: January 02, 2009, 05:05:02 pm »
This wont work because u forgot two } :D
This should work:
Quote
elseif ($3 == 382) {
if (Location-Name !isin $vcmp.area(%b)) {
vcmp.announce %id Lap 1
vcmp.msg %id Lap 1 completed Hurry to the next lap..
}
elseif (Location-Name !isin $vcmp.area(%b)) {
vcmp.announce %id Lap 2
vcmp.msg %id Lap 2 completed Hurry to the next lap..
}
}
« Last Edit: January 02, 2009, 06:40:14 pm by thijn »

Offline Amenine

  • Street Thug
  • *
  • Posts: 47
  • [UCG]Clan Leader -Scripter/Fighter/XE MoD-
    • View Profile
    • UCG
Re: Help With Pickups
« Reply #17 on: January 02, 2009, 06:24:14 pm »
Ahh right thijn..thanks for correcting it.. :D ;)

Offline Darkness

  • Wiseguy
  • **
  • Posts: 53
    • View Profile
Re: Help With Pickups
« Reply #18 on: January 04, 2009, 06:44:25 am »
mmm Thx Thijn and Amenine but not work :(

Offline thijn

  • LU testers
  • VC:MP Veteran
  • *
  • Posts: 667
  • Im proud to be pro.
    • View Profile
    • Vice Underdogs
Re: Help With Pickups
« Reply #19 on: January 04, 2009, 01:27:02 pm »
maby this:
Code: [Select]
elseif ($3 == 382) {
if (Location-Name isin $vcmp.area(%b)) {
vcmp.announce %id Lap 1
vcmp.msg %id Lap 1 completed Hurry to the next lap..
}
elseif (Location-Name isin $vcmp.area(%b)) {
vcmp.announce %id Lap 2
vcmp.msg %id Lap 2 completed Hurry to the next lap..
}
}

Offline Amenine

  • Street Thug
  • *
  • Posts: 47
  • [UCG]Clan Leader -Scripter/Fighter/XE MoD-
    • View Profile
    • UCG
Re: Help With Pickups
« Reply #20 on: January 04, 2009, 06:51:46 pm »
yah thijn is right i think... 8)
After: elseif ($3 == 382) {
U dont have to repeat this: elseif ($3 == 382) {

Regards
Amenine

Offline Darkness

  • Wiseguy
  • **
  • Posts: 53
    • View Profile
Re: Help With Pickups
« Reply #21 on: January 05, 2009, 05:03:58 am »
Thx for help me :)

Offline Darkness

  • Wiseguy
  • **
  • Posts: 53
    • View Profile
Re: Help With Pickups
« Reply #22 on: January 05, 2009, 05:05:41 am »
mmm , how to change ! for /c ? . Example !heal to /c heal.

Please Help ;)

Offline Darkness

  • Wiseguy
  • **
  • Posts: 53
    • View Profile
Re: Help With Pickups
« Reply #23 on: January 05, 2009, 05:31:46 am »
i need other help xD , how to block cars doors???

Offline Darkness

  • Wiseguy
  • **
  • Posts: 53
    • View Profile
Re: Help With Pickups
« Reply #24 on: January 05, 2009, 11:52:32 am »
UP!

Offline Amenine

  • Street Thug
  • *
  • Posts: 47
  • [UCG]Clan Leader -Scripter/Fighter/XE MoD-
    • View Profile
    • UCG
Re: Help With Pickups
« Reply #25 on: January 05, 2009, 12:40:49 pm »
For changing command [!] to this /c ::
U must replace these lines..
replace this:
Code: [Select]
on *:SIGNAL:vcmp.command2:{
  var %id = $1
  var %name = $vcmp.name($1)

With this:
Code: [Select]
on *:SIGNAL:vcmp.command2:{
  var %id = $1
  var %name = $vcmp.name($1)
  var %a = $iif($3,$iif($3 !isnum,$iif($vcmp.getid($3) != Unknown,$v1,-1),$iif($vcmp.name($3) != Unknown,$3,-1)),%id)
  var %b = $vcmp.getid(%name)

And paste ur heal command under:
Code: [Select]
on *:SIGNAL:vcmp.command2:{
Like:
Code: [Select]
on *::vcmp.command2:{
  var %id = $1
  var %name = $vcmp.name($1)

  if ($2 == register) {
    if ($vcmp.pass(%id) != $null) vcmp.msg %id Error - Nick is already registered..
    elseif (!$3) vcmp.msg %id Error - Missing Information, /c $2 <password>
    else {
      vcmp.announce %id ~t~Welcome to Carbon Gear..
      vcmp.msg Player %name Registered & Logged In (Admin Level: 1)
      vcmp.msg %id $chr(91) %name $chr(93) Registered successfully..
      vcmp.msg %id $chr(91) %name $chr(93) Logged in successfully..
      vcmp.msg %id Level: [1]
      vcmp.msg %id Password: $chr(91) $3 $chr(93)
      vcmp.announce %id ~y~Registartion Complete
      vcmp.setmoney %id 0
      !writeini -n vcmp.admin.ini LEVELS %name 1
      !writeini -n vcmp.admin.ini PASSWORDS %name $3
      !writeini -n vcmp.admin.ini LIN %name 1
    }
  }
  elseif ($2 == heal) {
    if ($vcmp.cmdcheck(!heal,%id) == fail) !halt
    elseif ($vcmp.setting.heal != on) vcmp.msg %id Error - $2 is Currently Set Off
    elseif ($vcmp.cost(%b) > $vcmp.cash(%b)) vcmp.msg %id Error - You need atleast $ $+ $bytes($vcmp.cost(%b),b) to use this command
    else {
      vcmp.cmdsay $2 %id >> Healed - Name: %name $+ , Cost: $ $+ $bytes($vcmp.cost(%b),b)
      vcmp.cash- %b $vcmp.cost(%b)
      vcmp.sethp $vcmp.getid(%name) 100
    }
  }
« Last Edit: January 05, 2009, 12:52:43 pm by Amenine »

Offline Amenine

  • Street Thug
  • *
  • Posts: 47
  • [UCG]Clan Leader -Scripter/Fighter/XE MoD-
    • View Profile
    • UCG
Re: Help With Pickups
« Reply #26 on: January 05, 2009, 12:51:35 pm »
And for locking system..use this:

Code: [Select]
;-----------------------------
;--------SERVER ALIAS's-------
;-----------------------------

alias vcmp.lock dll rcondll.dll RconCommand set 3 $1-

Code: [Select]
on *:SIGNAL:vcmp.command:{
elseif ($2 == !lockcar) {
  if ($vcmp.cmdcheck(!lockcar,%id) == fail) !halt
  elseif (!$3) vcmp.msg %id Error - Missing Information, $2 <car id>
  elseif ($3 !isnum) vcmp.msg %id Error - Invalid Vehicle ID, $2 <car id>
  else {
    vcmp.lock  $3 4
    vcmp.msg %id Your car has been locked now..
  }
}
elseif ($2 == !unlockcar) {
  if ($vcmp.cmdcheck(!unlockcar,%id) == fail) !halt
  elseif (!$3) vcmp.msg %id Error - Missing Information, $2 <car id>
  elseif ($3 !isnum) vcmp.msg %id Error - Invalid Vehicle ID, $2 <car id>
  else {
    vcmp.lock  $3 1
    vcmp.msg %id Your car has been unlocked now..
  }
}

Regards
Amenine
« Last Edit: January 05, 2009, 12:53:23 pm by Amenine »

Offline Darkness

  • Wiseguy
  • **
  • Posts: 53
    • View Profile
Re: Help With Pickups
« Reply #27 on: January 05, 2009, 12:52:35 pm »
mmm Thx man xD

Offline Darkness

  • Wiseguy
  • **
  • Posts: 53
    • View Profile
Re: Help With Pickups
« Reply #28 on: January 05, 2009, 12:53:12 pm »
how to lock the doors of the car is always locked?
« Last Edit: January 05, 2009, 12:58:13 pm by Darkness »

Offline Amenine

  • Street Thug
  • *
  • Posts: 47
  • [UCG]Clan Leader -Scripter/Fighter/XE MoD-
    • View Profile
    • UCG
Re: Help With Pickups
« Reply #29 on: January 05, 2009, 12:54:10 pm »
Updated the last post..

Thanks
Amenine