Kill A Player With A Certain Weapon? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Kill A Player With A Certain Weapon? (
/showthread.php?tid=167238)
Kill A Player With A Certain Weapon? -
lSCARl - 11.08.2010
what do i put after if so it kills someone with a heat seaking missle id 36?
Re: Kill A Player With A Certain Weapon? -
WillyP - 11.08.2010
..?
.
Re: Kill A Player With A Certain Weapon? -
lSCARl - 11.08.2010
Quote:
Originally Posted by [FU]Victious
..?
.
|
okay i bet youre good at scripting what i meant is how can i make it so it sets a players health to 0 but not all players just players with a heat seeking rocket launcher which is id 36 if u dont know
Re: Kill A Player With A Certain Weapon? -
Cameltoe - 11.08.2010
OnPlayerDeath:
if(GetPlayerWeapon(killerid) == WEPID)
{
SetPlayerHealth to 0 here with killerid as playerid
}
Re: Kill A Player With A Certain Weapon? -
WillyP - 11.08.2010
Quote:
Originally Posted by lSCARl
okay i bet youre good at scripting what i meant is how can i make it so it sets a players health to 0 but not all players just players with a heat seeking rocket launcher which is id 36 if u dont know
|
oh so something like
if you dont use a hs rocket launcher, u die?
Re: Kill A Player With A Certain Weapon? -
lSCARl - 11.08.2010
Quote:
Originally Posted by [FU]Victious
oh so something like
if you dont use a hs rocket launcher, u die?
|
opposite of that if the player has a hs rocket launcher he dies
Re: Kill A Player With A Certain Weapon? -
WillyP - 11.08.2010
ah!
lemmy make a lil script
Re: Kill A Player With A Certain Weapon? -
WillyP - 11.08.2010
i just did this quickly, might work
pawn Код:
public OnPlayerSpawn(playerid)
{
if(GetPlayerWeapon(playerid) == WEAPON_HEATSEEKINGROCKET) {
Kill(playerid);
return 1;
}
Re: Kill A Player With A Certain Weapon? -
Cameltoe - 11.08.2010
Quote:
Originally Posted by Cameltoe
OnPlayerDeath:
if(GetPlayerWeapon(killerid) == WEPID)
{
SetPlayerHealth to 0 here with killerid as playerid
}
|
Dude are you blind? i already made u a nice little snippet
Re: Kill A Player With A Certain Weapon? -
Conroy - 11.08.2010
OnPlayerDeath is called when someones health is 0...
That's like defining playerid as playerid.