• Welcome to Vice City Multiplayer.
 

Warn in SanSan v3

Started by thijn, July 05, 2008, 12:39:21 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

thijn

how can i make the vcmp.warn alias, i've copied it from GUS but it doesnt work.

Alias:

alias vcmp.warns !return $iif($readini(vcmp.warns.ini,WARNS,$vcmp.name($1)),$v1,0)
alias vcmp.warn {
  if ($vcmp.warns($1) >= 2) {
    !writeini -n vcmp.warns.ini WARNS $vcmp.name($1) 3
    vcmp.adminmsg Warning $vcmp.name($1) - New Warns: $vcmp.warns($1) $+ /3 $+ , Reason: $iif($3-,$v1,None) $+ , By Admin: $iif($2,$v1,Unknown)
    vcmp.adminmsg Kicking $vcmp.name($1) - Reason: Warn Limit Reached $+ , By Admin: $iif($2,$v1,Unknown)
    vcmp.kick $1
  }
  else {
    !writeini -n vcmp.warns.ini WARNS $vcmp.name($1) $calc($vcmp.warns($1) + 1)
    vcmp.adminmsg Warning $vcmp.name($1) - New Warns: $vcmp.warns($1) $+ /3 $+ , Reason: $iif($3-,$v1,None) $+ , By Admin: $iif($2,$v1,Unknown)
  }
}
alias vcmp.unwarn {
  !writeini -n vcmp.warns.ini WARNS $vcmp.name($1) 0
  vcmp.say $vcmp.name($1) Unwarned - New Warns: 0/3 $+ , Reason: $iif($3-,$v1,None) $+ , By Admin: $iif($2,$v1,Unknown)
}

when i do this:

  if ($par($vcmp.deathreason($4)) == (DriveBy)) vcmp.warn %idk Drive-bying is not allowed.

it doesn't work  :-\ :-\


thijn



thijn



ReVilo

You have to change the variables.
For example: vcmp.name doesnt exist in sansan.
Hint:
$vcmp.hgetname($vcmp.nameid($1))  :P