Hi,
I downloaded VRockers new DLL and vc-mp and now I am trying to edit to get it to a script that I can use, however, I can't seem to be able to make a login/ register system and for now I am trying to do a sethp command but that is failing:
on *:SIGNAL:vcmp.player.command2:{
; $1 = ServerID, $2 = PlayerID, $3 = Command, $4- = Params
vcmp.addchat $1 $vcmp.name( $1, $2 ) $+ : /c $3-
elseif ($3 == sethp) {
elseif (!$4) vcmp.msg $2 Error - Missing Information, $3 <name> <amount>
elseif (!$5) vcmp.msg $2 Error - Missing Information, $3 <name> <amount>
elseif ($4 == -1) vcmp.msg $2 Error - Invalid ID/Name
else {
vcmp.sethp $4 $5
vcmp.say Setting HP on: $4 To Amount: $5 $+ % By Admin: $2
}
!.signal vcmp.command2 $strip( $1- )
}
}
Any ideas?
All commands need the $1 parameter. This is used to do multiple things to multiple servers.
Heres the fixed code:
on *:SIGNAL:vcmp.player.command2:{
; $1 = ServerID, $2 = PlayerID, $3 = Command, $4- = Params
vcmp.addchat $1 $vcmp.name( $1, $2 ) $+ : /c $3-
if ($3 == sethp) {
if (!$4) vcmp.msg $1 $2 Error - Missing Information, $3 <name> <amount>
elseif (!$5) vcmp.msg $1 $2 Error - Missing Information, $3 <name> <amount>
elseif ($4 == -1) vcmp.msg $1 $2 Error - Invalid ID/Name
else {
vcmp.sethp $1 $4 $5
vcmp.say $1 Setting HP on: $4 To Amount: $5 $+ % By Admin: $2
}
}
!.signal vcmp.command2 $strip( $1- )
}
Also for reference, see my scripts Here (http://liberty-unleashed/AdminSystem.zip)
Edit: Also just noticed you using Elseif's without a starting if. You must have an if before an elseif within the same set of brackets
Thanks dude, Hopefully I get my head around the $1 part soon :)
Edit: For some reason it says there is missing information when I put in everything, for example:
/c sethp 0 20 --> could it be the 0?
Info: Yes it was the 0 but now u cant hp on daft things like bob or w/e and it don't even set the hp...meh! i give up :(
Edit 2: Linkage doesn't work :(
Well the $1 thing is easy, you just need to add it to every alias before id or other input parameters.
About that sethp command, use vcmp.sethealth, not vcmp.sethp (if you haven't changed the dll alias configurations in any way)
Yeah I realised that and changed it to vcmp.sethealth and it all works fine now, however, until my skills are a bit better im going back to sansan :P
To all that need a example of the new dllwe found this one to be the best exampleWSV v0.2 by Windlord, VRocker, and damo
http://forum.vicecitymultiplayer.com/index.php?topic=496.0