Vice City Multiplayer
VC:MP 0.3 => mIRC/pawn Scripting => Topic started by: thijn on August 20, 2008, 01:08:19 pm
-
Whats wrong with this:
on *:SIGNAL:vcmp.spawn:{
var %name = $1
var %id = $vcmp.getid($1)
echo @Server 5 $+ >> $1 spawned $+
if ($vcmp.setting.spawn == On) vcmp.say >> $1 spawned
if (($vcmp.pass(%id) != $null) && ($vcmp.lin(%id) != 1)) {
if ($vcmp.ip(%name) == $readini(vcmp.admin.ini,IPS,%name)) {
vcmp.say $iif($vcmp.level(%id) == 0,Member,$iif($vcmp.level(%id) == 1,Registered Player,Administrator)) %name Auto-Logged In (Admin Level: $vcmp.level(%id) $+ )
vcmp.msg %id You Auto Logged In - Nick-Name: %name $+ , Admin Level: $vcmp.level(%id) $+ , Status: $iif($vcmp.level(%id) == 0,Member,$iif($vcmp.level(%id) == 1,Registered Player,Administrator))
vcmp.timer.login %name off
!writeini -n vcmp.admin.ini LIN %name 1
!writeini -n vcmp.admin.ini IPS %name $vcmp.ip(%name)
}
else {
vcmp.announce %id PLEASE LOGIN TO THIS NICK-NAME
vcmp.msg %id You Must Login to this Nick-Name! Type: /c login <password>
vcmp.sethp %id 0
}
}
vcmp.add.spawns $vcmp.getid($1) 1
;!writeini -n vcmp.cheat.ini CHECK $1 0
vcmp.msg %id $vcmp.area(%id)
}
Because if i spawn i get no msg.
When i do:
on *:SIGNAL:vcmp.spawn:{
var %name = $1
var %id = $vcmp.getid($1)
echo @Server 5 $+ >> $1 spawned $+
if ($vcmp.setting.spawn == On) vcmp.say >> $1 spawned
if (($vcmp.pass(%id) != $null) && ($vcmp.lin(%id) != 1)) {
if ($vcmp.ip(%name) == $readini(vcmp.admin.ini,IPS,%name)) {
vcmp.say $iif($vcmp.level(%id) == 0,Member,$iif($vcmp.level(%id) == 1,Registered Player,Administrator)) %name Auto-Logged In (Admin Level: $vcmp.level(%id) $+ )
vcmp.msg %id You Auto Logged In - Nick-Name: %name $+ , Admin Level: $vcmp.level(%id) $+ , Status: $iif($vcmp.level(%id) == 0,Member,$iif($vcmp.level(%id) == 1,Registered Player,Administrator))
vcmp.timer.login %name off
!writeini -n vcmp.admin.ini LIN %name 1
!writeini -n vcmp.admin.ini IPS %name $vcmp.ip(%name)
}
else {
vcmp.announce %id PLEASE LOGIN TO THIS NICK-NAME
vcmp.msg %id You Must Login to this Nick-Name! Type: /c login <password>
vcmp.sethp %id 0
}
}
vcmp.add.spawns $vcmp.getid($1) 1
;!writeini -n vcmp.cheat.ini CHECK $1 0
vcmp.msg %id Spawned
}
It works ??? ??? ???
Why?
-
Try putting a timer on it.
For example:
timer 1 3 vcmp.msg %id Spawned at Location: $vcmp.area(%id)
This is because when you initially spawn it gets your location from where you died ;)
-
This still doesnt work :(
also my !loc does nothing :-\ :-\ :'(
$vcmp.location(%id) works, but $vcmp.area(%id) not, nothing happens!
What is wrong with area??
i didnt change anything to th alias ??? ???
-
PLz can someone help me :'( :'( :'(
EDIT: MIRC got this error: * Invalid parameters: $inpoly (line 936, gus.mrc)
-
change $vcmp.area(%id) to $vcmp.area($1). Should work, if not try change to %b. If still not change to %a but probably $1 or %b will work.
-
none of them work :-\ :-\
still error:
* Invalid parameters: $inpoly (line 936, gus.mrc)
line 936 is bold
alias vcmp.area {
var %a,%b = 1,%c = $vcmp.location($1,x),%d = $vcmp.location($1,y),%e
while (%b <= $ini(vcmp.data.ini,AREAS,0)) {
%e = $ini(vcmp.data.ini,AREAS,%b)
if ($inpoly(%c,%d, [ %e ] )) !return $readini(vcmp.data.ini,AREAS,%e)
!inc %b
}
!return Vice-City
}
-
make sure your not using a very old version of mirc.
update to the lastest version or 6.16 and above.
-
Seems to me that you have an invalid line in your vcmp.data.ini file under [AREAS]. This would cause the invalid parameters error if there is a stray letter somewhere. Try wiping the [AREAS] section clean then gradually re-add lines until it fails.
You could also pastebin it and give us the link (It may be long) so we can have a look for ourselves