Author Topic: Freeze  (Read 4699 times)

0 Members and 2 Guests are viewing this topic.

Offline thijn

  • LU testers
  • VC:MP Veteran
  • *
  • Posts: 667
  • Im proud to be pro.
    • View Profile
    • Vice Underdogs
Freeze
« on: July 20, 2008, 09:22:04 pm »
Does someone know how i can make a command like freeze, if i type !freeze <player> the player cant move anymore, untill i type !unfreeze <player>.
How do i start ???

Offline TanaX01

  • Made Man
  • ***
  • Posts: 214
  • BlackList! <3
    • View Profile
Re: Freeze
« Reply #1 on: July 20, 2008, 10:40:18 pm »
Does someone know how i can make a command like freeze, if i type !freeze <player> the player cant move anymore, untill i type !unfreeze <player>.
How do i start ???



mmm my freeze and unfreeze is gus you transfering to sasan script ok ?

 
Code: [Select]
  elseif ($2 == !freeze) || ($2 == !pmfreeze) {
    if ($vcmp.cmdcheck(!freeze,%id) == fail) !halt
    elseif (!$3) vcmp.msg %id Error - Missing Information, $2 <name> <reason>
    elseif (%a == -1) vcmp.msg %id Error - Absent ID/Name
    elseif ($readini(vcmp.freeze.ini,NAMES,$vcmp.name(%a))) vcmp.msg %id Error - $vcmp.name(%a) is already frozen
    else {
      vcmp.cmdsay $2 %id Freezing - Name: $vcmp.name(%a) $+ , Reason: $iif($4-,$v1,None) $+ , By Admin: %name
      !writeini -n vcmp.freeze.ini LOCATIONS $vcmp.name(%a) $round($vcmp.location(%a,x),2) $calc($round($vcmp.location(%a,y),2) + 2) $calc($round($vcmp.location(%a,z),2) - 1.5)
      !writeini -n vcmp.freeze.ini NAMES $vcmp.name(%a) 1
      .timerfreeze $+ %a -m 20 100 vcmp.freeze %a
      vcmp.setcont %a 0
    }
  }

Code: [Select]
  elseif ($2 == !unfreeze) || ($2 == !pmunfreeze) {
    if ($vcmp.cmdcheck(!unfreeze,%id) == fail) !halt
    elseif (!$3) vcmp.msg %id Error - Missing Information, $2 <name>
    elseif (%a == -1) vcmp.msg %id Error - Absent ID/Name
    elseif (!$readini(vcmp.freeze.ini,NAMES,$vcmp.name(%a))) vcmp.msg %id Error - $vcmp.name(%a) is not frozen
    else {
      vcmp.cmdsay $2 %id UnFreezing - Name: $vcmp.name(%a) $+ , By Admin: %name
      !remini vcmp.freeze.ini LOCATIONS $vcmp.name(%a)
      !remini vcmp.freeze.ini NAMES $vcmp.name(%a)
      .timerfreeze $+ %a off
      vcmp.setcont %a 1
    }
  }

you transfering to sasan   ;)

Offline Tamas

  • Made Man
  • ***
  • Posts: 127
    • View Profile
    • http://www.tamasnet.eu/
Re: Freeze
« Reply #2 on: August 04, 2008, 01:49:16 am »
Heres my script commands:

Quote
  elseif (($2 == freeze) && ($vcmp.loggedin($1) > 4)) {
    if ($vcmp.nameid($3) == $null) vcmp.adminmsg $1 Error: Invalid ID.
    elseif ($hget(vcmp,loggedin. $+ $1) < $hget(vcmp,loggedin. $+ $vcmp.nameid($3))) {
       vcmp.adminmsg $1 You can't freeze someone higher level admin than you.
  }
    else {
        vcmp.adminchat Admin $vcmp.hgetname($1) Freezed Player: $vcmp.hgetname($3)
       vcmp.setcon $3 0
    }
  }
  elseif (($2 == unfreeze) && ($vcmp.loggedin($1) > 4)) {
    if ($vcmp.nameid($3) == $null) vcmp.adminmsg $1 Error: Invalid ID.
    elseif ($hget(vcmp,loggedin. $+ $1) < $hget(vcmp,loggedin. $+ $vcmp.nameid($3))) {
       vcmp.adminmsg $1 You can't unfreeze someone higher level admin than you.
  }
    else {
       vcmp.adminchat Admin $vcmp.hgetname($1) Unfreezed Player: $vcmp.hgetname($3)
       vcmp.setcon $3 1
    }
  }

Offline TanaX01

  • Made Man
  • ***
  • Posts: 214
  • BlackList! <3
    • View Profile
Re: Freeze
« Reply #3 on: August 04, 2008, 03:11:46 am »
Nice Aport Tommis me now change Gus 10  :D

Offline Tommis

  • VC:MP Beta Tester (inactive)
  • Wiseguy
  • *
  • Posts: 56
    • View Profile
Re: Freeze
« Reply #4 on: August 04, 2008, 05:32:45 am »
Hey,

Just remember to use the "setcontrols 0/1" option and you should be all set like the above show.

Regards,
Tommis