[One more question =D]
#1

Ok....... so... i have my players type /dm1..... they are sent to a minigun match...... how do i get it so that when they are leaving a DM zone, they lose that gun?

Also, how do i get it so that when they are in the stunt area, they cannot fire their weapon?

Please don't post something saying "just go read the wiki dumbass!"

please actually post helpful things.
Thank you!
Reply
#2

Quote:

how do i get it so that when they are leaving a DM zone, they lose that gun?

ResetPlayerWeapons(playerid); will work fine for that
Reply
#3

Deleted [Check the up post]
Reply
#4

Quote:
Originally Posted by Kevin_Joshen
Посмотреть сообщение
please actually post helpful things.
Thank you!
Helpful things isn't just getting a code. It is to learn how to do it, so you can make it your self.
Reply
#5

Don't know how to lose 1 gun but you can Reset all weapons:
pawn Код:
ResetPlayerWeapons(playerid);
Reply
#6

Aight thanks! So just do

ResetPlayerWeapons(playerid);


and where should i put that? and that is all i need to put? is just (what is above) in the section that you tell me? and then their weapons are reset?


@Miikkel I never said i just wanted code.... i just said don't post stupid things like someone randomly posting "Vagina!" ............ believe me... it happens! =D
Reply
#7

Losing 1 gun:

pawn Код:
new weap; ammo;
GetPlayerWeaponData(playerid,7,weap,ammo); // Slot 7 was minigun etc right? The weapon is saved in the weap variable and his ammo is saved in the ammo variable.
GivePlayerWeapon(playerid,weap,-ammo); // Gives the player the negative amount of ammo he currently holds for his 'weap'.
Reply
#8

Quote:
Originally Posted by Hiddos
Посмотреть сообщение
Losing 1 gun:

pawn Код:
new weap; ammo;
GetPlayerWeaponData(playerid,7,weap,ammo); // Slot 7 was minigun etc right? The weapon is saved in the weap variable and his ammo is saved in the ammo variable.
GivePlayerWeapon(playerid,weap,-ammo); // Gives the player the negative amount of ammo he currently holds for his 'weap'.
This will also define if it's a minigun:

pawn Код:
new weap; ammo;
GetPlayerWeaponData(playerid,7,weap,ammo); // Slot 7 was minigun etc right? The weapon is saved in the weap variable and his ammo is saved in the ammo variable.
if(weap == 38) // is the weapon id of a Minigun
{
   GivePlayerWeapon(playerid,weap,-ammo); // Gives the player the negative amount of ammo he currently holds for his 'weap'.
}
Reply
#9

Alright! thanks!

But, how do i have it so that their weapons are just un-usable in Stunt areas? and usuable once they are out of the stunt zone?
Reply
#10

pawn Код:
public OnPlayerUpdate(playerid)
{
  if(IsPlayerInStuntArea(playerid)) SetPlayerArmedWeapon(playerid,0);
  return 1;
}
Just noticed this is exactly on the wiki D:
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)