• Welcome to Vice City Multiplayer.
 

reset weapons for fbs

Started by Scripter, December 17, 2010, 01:01:16 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Scripter

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

Devian

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

Kill3R

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 :)

Regards,
Kill3R

Scripter

#3
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

Scripter

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!
      }   
    }


Kill3R

 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
  }
    }



Regards,
Kill3R

Terminatorupgrade 2


Scripter

thnx kill3R can we ad cash when anyone wins lms