Author Topic: reset weapons for fbs  (Read 4540 times)

0 Members and 1 Guest are viewing this topic.

Offline Scripter

  • Wiseguy
  • **
  • Posts: 62
    • View Profile
reset weapons for fbs
« on: December 17, 2010, 03: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
« Last Edit: December 17, 2010, 03:14:06 pm by Scripter »

Offline Devian

  • Wiseguy
  • **
  • Posts: 92
    • View Profile
Re: reset weapons for fbs
« Reply #1 on: December 17, 2010, 03:18:16 pm »
to add wep: 18 Python,21 stubby,25 MP5
Code: [Select]
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.
Code: [Select]
vcmp.setweapon $1 $2 0 0

Offline Kill3R

  • VC:MP Beta Tester
  • Street Thug
  • *
  • Posts: 28
  • uhm... iam n00b, what to type here???
    • View Profile
    • Hunting-Arena
Re: reset weapons for fbs
« Reply #2 on: December 17, 2010, 05: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 :)

Regards,
Kill3R

Offline Scripter

  • Wiseguy
  • **
  • Posts: 62
    • View Profile
Re: reset weapons for fbs
« Reply #3 on: December 18, 2010, 09: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
« Last Edit: December 18, 2010, 09:38:09 am by Scripter »

Offline Scripter

  • Wiseguy
  • **
  • Posts: 62
    • View Profile
Re: reset weapons for fbs
« Reply #4 on: December 18, 2010, 09: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

 
Quote
elseif ($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!
      }   
    }


Offline Kill3R

  • VC:MP Beta Tester
  • Street Thug
  • *
  • Posts: 28
  • uhm... iam n00b, what to type here???
    • View Profile
    • Hunting-Arena
Re: reset weapons for fbs
« Reply #5 on: December 18, 2010, 11:56:48 am »
 hmm try this

Code: [Select]

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

Offline Terminatorupgrade 2

  • Wiseguy
  • **
  • Posts: 91
  • pawno scripter
    • View Profile
Re: reset weapons for fbs
« Reply #6 on: December 18, 2010, 12:21:45 pm »
thanks Kill3R

Offline Scripter

  • Wiseguy
  • **
  • Posts: 62
    • View Profile
Re: reset weapons for fbs
« Reply #7 on: December 18, 2010, 12:43:36 pm »
thnx kill3R can we ad cash when anyone wins lms