Help Weapon Damage
#1

for example, a man with friends bezbol stick struck the man once to die How can I do now please help Thanks.

Love ****** Translate xD.
Reply
#2

Check if the player is holding the weapon then != playerid and SetPlayerHealth
Reply
#3

Quote:
Originally Posted by [UG]Scripter
Посмотреть сообщение
Check if the player is holding the weapon then != playerid and SetPlayerHealth
or I can not do it, please write and give me your code
Reply
#4

Need Help Please..
Reply
#5

Ehm,
1. Dont double post for a bump after 30 mins

2. I really did not get what you want
Reply
#6

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{

if(newkeys & KEY_FIRE && newkeys & KEY_HANDBRAKE)
{
if(GetPlayerWeapon(playerid) == // Weapon ID)
{
for(new i = 0; i < GetMaxPlayers(); i++)
{
SetPlayerHealth(i,-10);
return 1;
}
}
}


This is an example. Work the rest out yourself.
Reply
#7

Quote:
Originally Posted by Mauzen
Посмотреть сообщение
Ehm,
1. Dont double post for a bump after 30 mins

2. I really did not get what you want
Thank you very much look forward
Reply
#8

Quote:
Originally Posted by [UG]Scripter
Посмотреть сообщение
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{

if(newkeys & KEY_FIRE && newkeys & KEY_HANDBRAKE)
{
if(GetPlayerWeapon(playerid) == // Weapon ID)
{
for(new i = 0; i < GetMaxPlayers(); i++)
{
SetPlayerHealth(i,-10);
return 1;
}
}
}


This is an example. Work the rest out yourself.
I try for a minute
Reply
#9

Quote:
Originally Posted by [UG]Scripter
Посмотреть сообщение
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{

if(newkeys & KEY_FIRE && newkeys & KEY_HANDBRAKE)
{
if(GetPlayerWeapon(playerid) == // Weapon ID)
{
for(new i = 0; i < GetMaxPlayers(); i++)
{
SetPlayerHealth(i,-10);
return 1;
}
}
}


This is an example. Work the rest out yourself.
I'm sorry it did not work :/
Reply
#10

Quote:
Originally Posted by [UG]Scripter
Посмотреть сообщение
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{

if(newkeys & KEY_FIRE && newkeys & KEY_HANDBRAKE)
{
if(GetPlayerWeapon(playerid) == // Weapon ID)
{
for(new i = 0; i < GetMaxPlayers(); i++)
{
SetPlayerHealth(i,-10);
return 1;
}
}
}
This is an example. Work the rest out yourself.
Thats just wrong.
(1) The loop fails because it returns 1.
(2) if the loop did work it would kill all players when KEY_FIRE and KEY_HANDBRAKE are used with the specified weapon.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)