16
mIRC/pawn Scripting / Script Help
« on: July 27, 2008, 09:35:13 pm »
Hi
This is my transfer script:
[/quote] elseif ($2 == !testgoto) {
if ($hget(vcmp,loggedin. $+ %id) < 10) { vcmp.adminmsg %id You must be Admin Level 10 or higher to attempt this command. }
else {
if ($vcmp.nameid($3) == $null) vcmp.adminmsg %id Error: Invalid ID.
else {
if ($hget(vcmp,loggedin. $+ %id) < $hget(vcmp,loggedin. $+ $vcmp.nameid($3))) { vcmp.adminmsg %id You can't teleport someone higher level than you... }
else {
vcmp.setloc %id $vcmp.hgetpos.x($3) $vcmp.hgetpos.y($3) $vcmp.hgetpos.z($3) 0
vcmp.adminchat Transfering:[ [ $vcmp.hgetname(%id) ] ] to:[ [ $vcmp.hgetname($3) ] ]
}
}
[/quote]
I want to do that when i type !testgoto --> i can give the player Name (not the ID only.) If i give examp: !testgoto 3 its work.
But in this format: !testgoto Tomi not .
Any idea how can i use this script with name variables too?
Tam
This is my transfer script:
[/quote] elseif ($2 == !testgoto) {
if ($hget(vcmp,loggedin. $+ %id) < 10) { vcmp.adminmsg %id You must be Admin Level 10 or higher to attempt this command. }
else {
if ($vcmp.nameid($3) == $null) vcmp.adminmsg %id Error: Invalid ID.
else {
if ($hget(vcmp,loggedin. $+ %id) < $hget(vcmp,loggedin. $+ $vcmp.nameid($3))) { vcmp.adminmsg %id You can't teleport someone higher level than you... }
else {
vcmp.setloc %id $vcmp.hgetpos.x($3) $vcmp.hgetpos.y($3) $vcmp.hgetpos.z($3) 0
vcmp.adminchat Transfering:[ [ $vcmp.hgetname(%id) ] ] to:[ [ $vcmp.hgetname($3) ] ]
}
}
[/quote]
I want to do that when i type !testgoto --> i can give the player Name (not the ID only.) If i give examp: !testgoto 3 its work.
But in this format: !testgoto Tomi not .
Any idea how can i use this script with name variables too?
Tam