• Welcome to Vice City Multiplayer.
 

Freeze

Started by thijn, July 20, 2008, 07:22:04 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

thijn

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 ???


TanaX01

Quote from: thijn on July 20, 2008, 07: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 ???


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

  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
    }
  }


  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   ;)

Tamas

Heres my script commands:

Quoteelseif (($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
    }
  }

TanaX01

Nice Aport Tommis me now change Gus 10  :D

Tommis

Hey,

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

Regards,
Tommis