Author Topic: Player Drop  (Read 6483 times)

0 Members and 1 Guest are viewing this topic.

Offline Synx

  • Street Thug
  • *
  • Posts: 27
    • View Profile
Player Drop
« on: May 06, 2011, 07:57:15 pm »
Hello,
Is it Imposible to create Players dont drop weapons?
*If its possible say how to create, when players dont drop weapons.

Thanks,
Synx

Offline Maxwell

  • Street Thug
  • *
  • Posts: 10
    • View Profile
Re: Player Drop
« Reply #1 on: May 06, 2011, 08:35:40 pm »
Try this
Quote
Quote
Quote
OnPlayerDeath(killer,player,reason)
{
SetPlayerWeapon(0,0);
}
NOTE:: UNTESTED

Offline Pawno

  • Street Thug
  • *
  • Posts: 15
    • View Profile
Re: Player Drop
« Reply #2 on: May 07, 2011, 10:50:19 pm »
Try,

[pawn]public OnPlayerDeath(playerid, killerid, reason, bodypart)
{
ResetPlayerWeapons(playerid);
return 1;
}[/pawn]

  :)

Offline Synx

  • Street Thug
  • *
  • Posts: 27
    • View Profile
Re: Player Drop
« Reply #3 on: May 08, 2011, 08:00:42 pm »
Doesn't work.
I think somethink like this:
[pawn]new timer;

public OnPlayerSpawn(playerid,classid,teamid)
{
   timer = SetTimer("OnPlayerDrop",10,1);
   return 1;
}

forward OnPlayerDrop(playerid);

public OnPlayerDrop(playerid)
{
   new Float:hp; GetPlayerHealth(playerid,hp);
   if(hp < 1)
   {
   ResetPlayerWeapons(playerid);
   }
return 1;
}

public OnPlayerDeath(playerid, killerid, reason, bodypart)
{
KillTimer(timer);
return 1;
}
[/pawn]

but it's bugs when I choose player.

Offline shivambansal

  • Wiseguy
  • **
  • Posts: 52
  • VC:MP Beta Tester
    • View Profile
Re: Player Drop
« Reply #4 on: May 08, 2011, 08:38:26 pm »
you mean /c disarm?

Offline Synx

  • Street Thug
  • *
  • Posts: 27
    • View Profile
Re: Player Drop
« Reply #5 on: May 09, 2011, 05:50:32 pm »
you mean /c disarm?

No... I mean i want system when player dies no weapons shows on ground.

Offline shivambansal

  • Wiseguy
  • **
  • Posts: 52
  • VC:MP Beta Tester
    • View Profile
Re: Player Drop
« Reply #6 on: May 09, 2011, 07:41:20 pm »
you mean /c disarm?

No... I mean i want system when player dies no weapons shows on ground.
:o it is possible?

Offline Synx

  • Street Thug
  • *
  • Posts: 27
    • View Profile
Re: Player Drop
« Reply #7 on: May 10, 2011, 01:55:05 pm »

 :o it is possible?
[/quote]

what do you mean?

Offline Maxwell

  • Street Thug
  • *
  • Posts: 10
    • View Profile
Re: Player Drop
« Reply #8 on: May 10, 2011, 10:49:27 pm »
Woooooooooooooooooooooooooot WORKS but BUGGED when i got under 10 hp i got reseted weps :( FIST FIGHT XDDD

Offline Synx

  • Street Thug
  • *
  • Posts: 27
    • View Profile
Re: Player Drop
« Reply #9 on: May 11, 2011, 01:54:44 pm »
Then is it possible ?

Offline aXXo

  • Wiseguy
  • **
  • Posts: 50
    • View Profile
Re: Player Drop
« Reply #10 on: May 11, 2011, 04:58:20 pm »
Even if you reset a player's weapons, he will still drop it.

You might have noticed that when you run out of ammo of a wep, then after death you still drop it.
I dont think it is possible to script...  :(

Offline Maxwell

  • Street Thug
  • *
  • Posts: 10
    • View Profile
Re: Player Drop
« Reply #11 on: May 12, 2011, 10:43:20 am »
onPickedUp(plr , id)
{
resetplayerweapons(plr)
SetplayerWep m4 spaz
}


xDDD ???

Offline stormeus

  • VC:MP Developer
  • VC:MP Veteran
  • *
  • Posts: 1122
    • View Profile
Re: Player Drop
« Reply #12 on: May 12, 2011, 08:59:08 pm »
onPickedUp(plr , id)
{
resetplayerweapons(plr)
SetplayerWep m4 spaz
}


xDDD ???

  • Would reset the player's weapons whenever they went to ANY pickup
  • Invalid syntax for SetPlayerWep
  • Weapon pickups don't work with OnPickedUp, as far as I know
Do not PM me for support.




Offline NIPNIC

  • Street Thug
  • *
  • Posts: 2
    • View Profile
Re: Player Drop
« Reply #13 on: May 16, 2011, 05:39:39 am »
onPickedUp(plr , id)
{
resetplayerweapons(plr)
SetplayerWep m4 spaz
}


xDDD ???

Wth, Totally wrong.  ???