03.08.2013, 12:48
Basically i want wen A team use Left Alt ,If he is of Team B and is near him he should die at instant.
I tried it but my code didn't work can you help me out please
Can anybody help me ?
I tried it but my code didn't work can you help me out please
pawn Код:
if(PRESSED(KEY_WALK))
{
if(team[playerid] == TEAM_ZOMBIE)
{
if(pInfo[playerid][pZombieClass] == TYRANTZOMBIE)
{
new victimid = GetClosestPlayer(playerid);
if(IsPlayerConnected(victimid))
{
switch(GetPlayerSkin(victimid))
{
case NON_IMMUNE,70:
{
if(GetDistanceBetweenPlayers(playerid,victimid) < 1.5)
{
if(gettime() - 9 < Abilitys[playerid][TyrantAttack]) return GameTextForPlayer(playerid,"~w~ Still recovering",4000,5);
{
new Float:hp,zmstring[256];
GetPlayerHealth(victimid,hp);
SetPlayerHealth(victimid, hp -200);
GameTextForPlayer(victimid,"~n~~n~~n~~n~~y~Tyrant Attack ",3000,5);
GivePlayerXP(playerid,15);
format(zmstring,sizeof(zmstring), ""info""COL_PINK" %s has been Tyrant attacked by %s",PlayerName(victimid),PlayerName(playerid));
SendClientMessageToAll(-1,zmstring);
new msg[128];
format(msg, sizeof(msg), "02%s has been Tyrant attacked by %s",PlayerName(victimid),PlayerName(playerid));
IRC_GroupSay(groupID, IRC_CHANNEL, msg);
Abilitys[playerid][TyrantAttack] = gettime();
}
}
}
}
}
}
}
}