• Welcome to Vice City Multiplayer.
 

Problem with /c goto etc.

Started by thijn, August 12, 2008, 03:58:06 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

thijn

I have a problem.
I want to convert !goto <id/name> to /c goto <id/name>
but when i use this, it doesnt work :-[ :-[

  elseif ($2 == goto) {
    if ($vcmp.cmdcheck(!goto,%id) == fail) !halt
    elseif (!$3) vcmp.msg %id Error - Missing Information, $2 <name>
    elseif (%a == -1) vcmp.msg %id Error - Absent ID/Name
    elseif (%a == $vcmp.getid(%name)) vcmp.msg %id Error - Cannot $2 to Yourself
    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.cash- %b $vcmp.cost(%b)
      vcmp.goto %b %a
      vcmp.cmdsay $2 %id Goto - Taking: %name $+ , To: $vcmp.name(%a) $+ , Cost: $ $+ $bytes($vcmp.cost(%b),b)
    }
  }

I have the same problem with: Ban, Kick, Warn and Subalias  :-[

elseif ($2 == ban) {
    if ($vcmp.cmdcheck(!ban,%id) == fail) !halt
    elseif (!$3) vcmp.msg %id Error - Missing Information, $2 <name> <reason>
    elseif (%a == -1) vcmp.msg %id Error - Invalid ID/Name
    elseif (%a == $vcmp.getid(%name)) vcmp.msg %id Error - Cannot $2 Yourself
    elseif ($vcmp.level(%a) >= $vcmp.level($vcmp.getid(%name))) vcmp.msg %id Error - Cannot $2 a player with the same or higher Level
    else {
      vcmp.cmdsay $2 %id Banning $vcmp.name($vcmp.getid($3)) - By Admin: %name $+ , Reason: $iif($4,$v1,None)
      vcmp.ban $vcmp.getid($3)
    }
  }
  elseif ($2 == kick) {
    if ($vcmp.cmdcheck(!kick,%id) == fail) !halt
    elseif (!$3) vcmp.msg %id Error - Missing Information, $2 <name> <reason>
    elseif (%a == -1) vcmp.msg %id Error - Invalid ID/Name
    elseif (%a == $vcmp.getid(%name)) vcmp.msg %id Error - Cannot $2 Yourself
    elseif ($vcmp.level(%a) >= $vcmp.level($vcmp.getid(%name))) vcmp.msg %id Error - Cannot $2 a player with the same or higher Level
    else {
      vcmp.cmdsay $2 %id Kicking $vcmp.name($vcmp.getid($3)) - By Admin: %name $+ , Reason: $iif($4,$v1,None)
      vcmp.kick $vcmp.getid($3)
    }
  }
  elseif ($2 == warn) {
    if ($vcmp.cmdcheck(!warn,%id) == fail) !halt
    elseif (!$3) vcmp.msg %id Error - Missing Information, $2 <name> <reason>
    elseif (%a == -1) vcmp.msg %id Error - Invalid ID/Name
    elseif (%a == $vcmp.getid(%name)) vcmp.msg %id Error - Cannot $2 Yourself
    elseif ($vcmp.level(%a) >= $vcmp.level($vcmp.getid(%name))) vcmp.msg %id Error - Cannot $2 a player with the same or higher Level
    else {
      vcmp.warn $vcmp.getid($3) %name $4-
    }
  }
  elseif ($2 == goto) {
    if ($vcmp.cmdcheck(!goto,%id) == fail) !halt
    elseif (!$3) vcmp.msg %id Error - Missing Information, $2 <name>
    elseif (%a == -1) vcmp.msg %id Error - Absent ID/Name
    elseif (%a == $vcmp.getid(%name)) vcmp.msg %id Error - Cannot $2 to Yourself
    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.cash- %b $vcmp.cost(%b)
      vcmp.goto %b %a
      vcmp.cmdsay $2 %id Goto - Taking: %name $+ , To: $vcmp.name(%a) $+ , Cost: $ $+ $bytes($vcmp.cost(%b),b)
    }
  }
  elseif ($2 == subalias) {
    if ($vcmp.cmdcheck(!subalias,%id) == fail) !halt
    elseif ($vcmp.getid($3) == -1) {
      if (!$vcmp.alias($3)) vcmp.msg %id Error - Could Not Find Sub-Alias Under " $+ $3 $+ " $+ , $2 <name/ip>
      else vcmp.cmdsay $2 %id $3 $+ 's Sub-Alias - Names: $vcmp.alias($3)
    }
    elseif (!$vcmp.alias($gettok($vcmp.ip($vcmp.name($vcmp.getid($3))),1-2,46))) vcmp.msg %id Error - $vcmp.name($vcmp.getid($3)) does not have a Sub-Alias
    else vcmp.cmdsay $2 %id $vcmp.name(%a) $+ 's Sub-Alias - Names: $vcmp.alias($gettok($vcmp.ip($vcmp.name(%a)),1-2,46))
  }


Plz can someone help me ???


Force

Hmm, Did you put them under the logout command?

thijn



thijn

Heal works:

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


szostol

change elseif to if

I mean first elseif not rest.

Like:

Quoteif ($2 == goto) {
    if ($vcmp.cmdcheck(!goto,%id) == fail) !halt
    elseif (!$3) vcmp.msg %id Error - Missing Information, $2 <name>
    elseif (%a == -1) vcmp.msg %id Error - Absent ID/Name
    elseif (%a == $vcmp.getid(%name)) vcmp.msg %id Error - Cannot $2 to Yourself
    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.cash- %b $vcmp.cost(%b)
      vcmp.goto %b %a
      vcmp.cmdsay $2 %id Goto - Taking: %name $+ , To: $vcmp.name(%a) $+ , Cost: $ $+ $bytes($vcmp.cost(%b),b)
    }
  }

TanaX01

Hey Szostol code is if ($2 == goto) { for /c goto id

if ($1 == goto) { for !goto id ?

my dude  :-X

szostol

Look at mine:

Quoteif ($2 == goto) || ($2 == pmgoto) {
    if ($vcmp.cmdcheck(!goto,%id) == fail) !halt
    elseif (!$3) vcmp.msg %id  Invalid command usage
    elseif (%a == -1) vcmp.msg %id  Invalid ID/Name
    elseif (%a == $vcmp.getid(%name)) vcmp.msg %id You can't transfer to yourself
    else {
      vcmp.goto %id %a
     vcmp.cmdsay $2 %id Transfering: $+($chr(91),$vcmp.name(%id),$chr(93)) To: $+($chr(91),$vcmp.name(%a),$chr(93))
    }
  }