spawn damage for human
#1

hello samp ,i have these damages if any human shoot zombie at any point..i want this if any human shoot zombie on spawn point.give him same dameges back sorry for bad english ..plz help i m new in scripting
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
PlayerShotPlayer[issuerid][playerid] = 1;

if(team[issuerid] == TEAM_HUMAN)
{
if(pInfo[issuerid][pHumanClass] == KICKBACK || pInfo[issuerid][pVipKickBack] == 1 || pInfo[issuerid][pKickBackCoin])
{
if(team[playerid] == TEAM_ZOMBIE)
{
if(weaponid == 23 || weaponid == 25 || weaponid == 24 || weaponid == 34 || weaponid == 31)
{
new Float,Float:y,Float:z,Float:angle;
GetPlayerFacingAngle(playerid,Float:angle);
GetPlayerVelocity(playerid,Float,Float:y,Float:z );

SetPlayerVelocity(playerid,Float+0.1,Float:y+0.1 ,Float:z+0.2);
SetPlayerFacingAngle(playerid,Float:angle);
}
}
}
}

if(team[issuerid] == TEAM_HUMAN)
{
if(pInfo[issuerid][pHumanClass] == VIPSCOUT)
{
if(team[playerid] == TEAM_ZOMBIE)
{
if(weaponid == 34)
{
new Float:hp;
GetPlayerHealth(playerid,hp);
SetPlayerHealth(playerid, hp - 50);
}
}
}
}
if(team[issuerid] == TEAM_ZOMBIE || TEAM_HUMAN)
{
if(pInfo[issuerid][pHour] <= 0)
{
if(team[playerid] == TEAM_HUMAN)
{
pInfo[issuerid][pXP] += 10;
}
}
}

if(team[issuerid] == TEAM_HUMAN)
{
if(pInfo[issuerid][pHumanClass] == COWBOY)
{
if(team[playerid] == TEAM_ZOMBIE)
{
if(weaponid == 22)
{
new Float:hp;
GetPlayerHealth(playerid,hp);
SetPlayerHealth(playerid, hp - 20);
}
}
}
}

if(team[issuerid] == TEAM_HUMAN)
{
if(pInfo[issuerid][pHumanClass] == ASSASSIN)
{
if(team[playerid] == TEAM_ZOMBIE)
{
if(weaponid ==
{
new Float:hp;
GetPlayerHealth(playerid,hp);
SetPlayerHealth(playerid, hp - 100);
}
}
}
}
if(team[issuerid] == TEAM_HUMAN)
{
if(pInfo[issuerid][pHumanClass] == PIMP)
{
if(team[playerid] == TEAM_ZOMBIE)
{
if(weaponid == 10)
{
new Float:hp;
GetPlayerHealth(playerid,hp);
SetPlayerHealth(playerid, hp - 15);
}
}
}
}
if(team[issuerid] == TEAM_HUMAN)
{
if(pInfo[issuerid][pHumanClass] == EXPERIENCEDSCOUT)
{
if(team[playerid] == TEAM_ZOMBIE)
{
if(weaponid == 34 || weaponid == 23 )
{
new Float:hp;
GetPlayerHealth(playerid,hp);
SetPlayerHealth(playerid, hp - 100);
}
}
}
}
if(team[issuerid] == TEAM_HUMAN)
{
if(pInfo[issuerid][pHumanClass] == SCOUT || pInfo[issuerid][pHumanClass] == HEAVYSHOTGUN || pInfo[issuerid][pHumanClass] == KICKBACK || pInfo[issuerid][pDamageShotgunCoin] == 1)
{
if(team[playerid] == TEAM_ZOMBIE)
{
if(weaponid == 25)
{
new Float:hp;
GetPlayerHealth(playerid,hp);
SetPlayerHealth(playerid, hp - 35);
}
if(weaponid == 34)
{
new Float:hp;
GetPlayerHealth(playerid,hp);
SetPlayerHealth(playerid, hp - 35);
}
}
}
}

if(team[issuerid] == TEAM_HUMAN)
{
if(pInfo[issuerid][pHumanClass] == SHOTGUNSPECIAL)
{
if(team[playerid] == TEAM_ZOMBIE)
{
if(weaponid == 25)
{
new Float:hp;
GetPlayerHealth(playerid,hp);
SetPlayerHealth(playerid, hp - 50);
}
}
}
}
return 1;
}
Reply
#2

plz help //all just seeing and ingnors
Reply
#3

put that in [code]ur code [ /code]
Reply
#4

what i put there
Reply
#5

[code] my code [ /code] not working
Reply
#6

anyhelp for spawn damages gives to human
Reply
#7

Use [PHP] [/ PHP] BETWEEN YOUR CODE
Reply
#8

[PHP]
(pInfo[issuerid][pHumanClass] == SCOUT || pInfo[issuerid][pHumanClass] == HEAVYSHOTGUN || pInfo[issuerid][pHumanClass] == KICKBACK || pInfo[issuerid][pDamageShotgunCoin] == 1)
{
if(team[playerid] == TEAM_ZOMBIE)
{
if(weaponid == 25)
{
new Float:hp;
GetPlayerHealth(playerid,hp);
SetPlayerHealth(playerid, hp - 35);
}
if(weaponid == 34)
[/ PHP]
Reply
#9

how to do this.give me any example
Reply
#10

use [PAWN] [ /PAWN]
like this
pawn Код:
TEST
Reply
#11

[PAWN]Test not working [ /PAWN]
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)