Vice City Multiplayer

VC:MP => mIRC/pawn Scripting => Topic started by: Scripter on December 17, 2010, 01:01:16 PM

Title: reset weapons for fbs
Post by: Scripter on December 17, 2010, 01:01:16 PM
can any one tell me  reset weapons an giveplayer wepon auto when we join !lms just like  gups in !fight
like this
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 26, 700);
this is for gups but i want this for FBs.mirc
Title: Re: reset weapons for fbs
Post by: Devian on December 17, 2010, 01:18:16 PM
to add wep: 18 Python,21 stubby,25 MP5
vcmp.setweapon $1 $2 18 500                          
vcmp.setweapon $1 $2 21 500
vcmp.setweapon $1 $2 25 500


to remove all weapon from player:
it will remove all weapons.
vcmp.setweapon $1 $2 0 0
Title: Re: reset weapons for fbs
Post by: Kill3R on December 17, 2010, 03:26:13 PM
exactly what Devian said, just use some vars to define the player id

eg:

var %id = $2

and use the vcmp.setweapon first before setting the weapons, as it will disarm all the current weps that the plr holds :)
Title: Re: reset weapons for fbs
Post by: Scripter on December 18, 2010, 07:30:28 AM
thnx kill3R and devian but when i do !lms it says join in 20sec but after 20 sec player still can join why and
they dont join same time when i do !join 5 times then i can join  and when i join lms i get freeze but not others players which already players in lms
sorry for bad English see this pic
(http://img836.imageshack.us/img836/5480/vcmp015.jpg)
Title: Re: reset weapons for fbs
Post by: Scripter on December 18, 2010, 07:52:36 AM
i put the setwep but weapon cant get reseted with stubby i still have m60 and ing
i think i need first reset my weapons then setweapon

Quoteelseif ($3 == lms) {
    if (%lms == on) vcmp.say $1 ** LastManStanding already in progress!
    else {
      set %lms on
      timer 1 1 vcmp.say $1 ** LastManStanding has started! Type !join within 20 seconds.
      timer 1 20 set %lms off
    }
     }
  elseif ($3 == join) {
    if (%lms == on) vcmp.say $1 ** $vcmp.name($1, $2) has joined LastManStanding!
    else {
    vcmp.setlocation $1 $2 -754.187866 -1602.638916 23.734970
    vcmp.setarmour $1 $vcmp.name($1, $2) 0
    vcmp.sethealth $1 $vcmp.name($1, $2) 100
    vcmp.setweapon $1 $vcmp.name($1, $2) 21 500
    vcmp.msg $1 $2 Taking you to LastManStanding. Enjoy!
      timer 1 1 vcmp.setcontrols $1 $vcmp.name($1, $2) 0
      timer 1 2 vcmp.say $1 LastManStanding starting in:
      timer 1 5 vcmp.say $1 ---- 1 ----
      timer 1 6 vcmp.say $1 ---- 2 ----
      timer 1 7 vcmp.say $1 ---- 3 ----
      timer 1 8 vcmp.say $1 ---- GO! ----
      timer 1 8 vcmp.setcontrols $1 $vcmp.name($1, $2) 1
     }
   else {
         if (%lms == off) {
    vcmp.say $1 ** LastManStanding is not active!
      }   
    }

Title: Re: reset weapons for fbs
Post by: Kill3R on December 18, 2010, 09:56:48 AM
 hmm try this


elseif ($3 == lms) {
    if (%lms == on) vcmp.say $1 ** LastManStanding already in progress!
    else {
      set %lms on
      vcmp.say $1 ** LastManStanding has started! Type !join within 20 seconds.
      .timer 1 20 set %lms off
    }
  }

  elseif ($3 == join) {
  var %id = $2
    if (%lms == off) vcmp.say 1 **  $vcmp.name($1, %id) LastManStanding is not active!
    else {
    vcmp.say $1 ** $vcmp.name($1, %id) has joined LastManStanding!
    vcmp.setlocation $1 %id -754.187866 -1602.638916 23.734970
    vcmp.setarmour $1 %id 0
    vcmp.sethealth $1 %id 100
vcmp.setweapon $1 %id 0 0
    vcmp.setweapon $1 %id 21 500
    vcmp.msg $1 %id Taking you to LastManStanding. Enjoy!
      timer 1 1 vcmp.setcontrols $1 %id 0
      timer 1 2 vcmp.say $1 LastManStanding starting in:
      timer 1 5 vcmp.say $1 ---- 1 ----
      timer 1 6 vcmp.say $1 ---- 2 ----
      timer 1 7 vcmp.say $1 ---- 3 ----
      timer 1 8 vcmp.say $1 ---- GO! ----
      timer 1 8 vcmp.setcontrols $1 %id 1
  }
    }


Title: Re: reset weapons for fbs
Post by: Terminatorupgrade 2 on December 18, 2010, 10:21:45 AM
thanks Kill3R
Title: Re: reset weapons for fbs
Post by: Scripter on December 18, 2010, 10:43:36 AM
thnx kill3R can we ad cash when anyone wins lms