Vice City Multiplayer

VC:MP 0.3 => mIRC/pawn Scripting => Topic started by: Knucis on October 03, 2008, 07:53:22 pm

Title: Whats rong with this command?? (GUS)
Post by: Knucis on October 03, 2008, 07:53:22 pm
I've made this command and aint work... It wont freeze me and it wont go to Jail... I have the right AXIS...

Heres is the code:
Quote
  elseif ($2 == !jail) {
    if ($vcmp.name(%a) == $null) vcmp.msg %id Error: Invalid ID.
    vcmp.say Cop: %name Jailed: $vcmp.name(%a) for: 1 min
    vcmp.setlocation $vcmp.name(%a) 388.687256 -511444 9.395617
    vcmp.announce %id You are ~o~Jailed!
    vcmp.setcont $vcmp.name(%a) 1
    !.timer 1 60 vcmp.setcont $vcmp.name(%a) 0
    !.timer 1 1 vcmp.annouce %id $vcmp.name(%a) Is now released from jail!
    }

Sorry for my English

Please help me :)

Cya, Knucis
Title: Re: Whats rong with this command?? (GUS)
Post by: Force on October 03, 2008, 07:58:19 pm
Try this :)

Code: [Select]
elseif ($2 == !jail) {
    if ($vcmp.name(%a) == $null) vcmp.msg %id Error: Invalid ID.
else {
    vcmp.say Cop: %name Jailed: $vcmp.name(%a) for: 1 min
    vcmp.setlocation %a 388.687256 -511444 9.395617
    vcmp.announce %a You are ~o~Jailed!
    vcmp.setcont %a 0
    !.timer 1 60 vcmp.setcont %a 1
    !.timer 1 60 vcmp.say $vcmp.name(%a) Is now released from jail!
}
}
Title: Re: Whats rong with this command?? (GUS)
Post by: Knucis on October 03, 2008, 07:59:48 pm
Thanks FORC3 :D I will test it now.
Title: Re: Whats rong with this command?? (GUS)
Post by: Knucis on October 03, 2008, 08:05:34 pm
The game crash when i type that command :\
Title: Re: Whats rong with this command?? (GUS)
Post by: Force on October 03, 2008, 09:50:40 pm
Hmm thats odd, it should work  ??? It's just about the same as the one that I had for GUS which worked fine.
Title: Re: Whats rong with this command?? (GUS)
Post by: Knucis on October 03, 2008, 11:30:17 pm
hmmm... but you have v10.0 or 9.0??

Cya, Knucis
Title: Re: Whats rong with this command?? (GUS)
Post by: Force on October 03, 2008, 11:50:28 pm
Mine was V9.0, pheraps the v10 is a bit different
Title: Re: Whats rong with this command?? (GUS)
Post by: Knucis on October 04, 2008, 12:48:33 am
Im using v9.0 bcuz the secret packeges are working... But i dont think that 10.0 is diferent

Cya, Knucis
Title: Re: Whats rong with this command?? (GUS)
Post by: thijn on October 04, 2008, 12:54:43 pm
try:
Code: [Select]
elseif ($2 == !jail) {
    if ($vcmp.name(%a) == $null) vcmp.msg %id Error: Invalid ID.
else {
    vcmp.say Cop: %name Jailed: $vcmp.name(%a) for: 1 min
    vcmp.setlocation %a 388.687256 -511444 9.395617 0
    vcmp.announce %a You are ~o~Jailed!
    vcmp.setcont %a 0
    !timer 1 60 vcmp.setcont %a 1
    !timer 1 60 vcmp.say $vcmp.name(%a) Is now released from jail!
}
}
Title: Re: Whats rong with this command?? (GUS)
Post by: Knucis on October 04, 2008, 01:36:24 pm
Thanks thijn... :) But it crash too -_-! And when I change axis it goes always to the golf place -.- Any soluctions?
Title: Re: Whats rong with this command?? (GUS)
Post by: Punjabi on October 04, 2008, 02:13:23 pm
Try this one out.... ;)

Code: [Select]
elseif ($2 == !jail) || ($2 == !pmjail) {
    if ($vcmp.cmdcheck(!jail,%id) == fail) !halt
    elseif (!$3) vcmp.msg %id Error - Missing Information, $2 <name> <reason>
    elseif (%a == -1) vcmp.msg %id Error - Invalid ID/Name
    else {
      vcmp.cmdsay $2 %id  $vcmp.name(%a) - Has been Jailed By Admin: %name $+ , Reason: $iif($4,$v1,None)
      vcmp.setlocation %a 388.669739 -509.847992 9.395614
      vcmp.setcont %a 0
    }
Title: Re: Whats rong with this command?? (GUS)
Post by: Knucis on October 04, 2008, 02:31:54 pm
Code: [Select]
elseif ($2 == !jail) || ($2 == !pmjail) {
    if ($vcmp.cmdcheck(!jail,%id) == fail) !halt
    elseif (!$3) vcmp.msg %id Error - Missing Information, $2 <name> <reason>
    elseif (%a == -1) vcmp.msg %id Error - Invalid ID/Name
    else {
      vcmp.cmdsay $2 %id  $vcmp.name(%a) - Has been Jailed By Admin: %name $+ , Reason: $iif($4,$v1,None)
      vcmp.setlocation %a 388.669739 -509.847992 9.395614
      vcmp.setcont %a 0
    }

Yes nice example :).. but It stays always in the jail... I want like RPG like this:
Code: [Select]
[code]elseif ($2 == !jail) || ($2 == !pmjail) {
    if ($vcmp.cmdcheck(!jail,%id) == fail) !halt
    elseif (!$3) vcmp.msg %id Error - Missing Information, $2 <name> <reason>
    elseif (%a == -1) vcmp.msg %id Error - Invalid ID/Name
    else {
      vcmp.cmdsay $2 %id  $vcmp.name(%a) - Has been Jailed By Admin: %name $+ , Reason: $iif($4,$v1,None)
      vcmp.setlocation %a 388.669739 -509.847992 9.395614
      vcmp.setcont %a 0
      !.timer 1 [add custom time but i dunno how] setcont %id 1
      !.timer 1 $5 vcmp.announce %id You have been released form jail!
      !.timer 1 $5 vcmp.say vcmp.name(%a) has been released form jail!
}
or something like that!

Cya, Knucis[/code]
Title: Re: Whats rong with this command?? (GUS)
Post by: Chezor on October 04, 2008, 02:39:43 pm
Code: [Select]
elseif ($2 == !jail) || ($2 == !pmjail) {
if ($vcmp.cmdcheck(!jail,%id) == fail) !halt
elseif (!$3) vcmp.msg %id Error Missing Info, Type !jail <name> <reason>
elseif (%a == -1) vcmp.msg %id Player not present in server
else {
vcmp.cmdsay $2 %id $vcmp.name(%a) - Has been Jailed by %name $+ , Reason $iif($4,$v1,None)
vcmp.setlocation %a $vcmp.axis.getloc(jail) 
vcmp.setcont %a 0
!timer 1 60 vcmp.setcont %a 1
!timer 1 60 vcmp.say $vcmp.name(%a) is now released from jail
}
}

Extra Intructions:
Load your GUS script, Goto VCPD HQ jail cell and type !saveloc jail
and then use that code given above...

And please.... dont say you are great.... you are the best or... I (knucis) am a noob scripter.. because you can try and learn scripting :P
Title: Re: Whats rong with this command?? (GUS)
Post by: Knucis on October 04, 2008, 02:51:50 pm
Thanks Chezor :) Now that i learned somethings about scripts I can do my own commands and its fun to test it!

Thanks everybody!

Cya, Knucis
Title: Re: Whats rong with this command?? (GUS)
Post by: Chezor on October 04, 2008, 03:08:33 pm
Thanks Chezor :) Now that i learned somethings about scripts I can do my own commands and its fun to test it!

Thanks everybody!

Cya, Knucis

Np, if you learn scripting. i can give u opportunity to script for gamesparks (if you would like to)  ;)
Title: Re: Whats rong with this command?? (GUS)
Post by: Knucis on October 04, 2008, 03:45:52 pm
Yes, i can script for GameSparks but i need help to understand somethings first :P !! :)  Now im trying to understand how to use alias to do a Wanted and !sus command!

Cya, Knucis