0 Members and 1 Guest are viewing this topic.
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
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 } }
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 } }