if(PRESSED(KEY_WALK))
{
if(team[playerid] == TEAM_ZOMBIE)
{
if(pInfo[playerid][pZombieClass] == STOMPERZOMBIE)
{
if(gettime() - 6 < Abilitys[playerid][StomperPushing]) return GameTextForPlayer(playerid,"~w~ Still recovering",1000,5);
{
new Float:x,Float:y,Float:z,Float:Angle;
GetPlayerPos(playerid,Float:x,Float:y,Float:z);
GetPlayerFacingAngle(playerid,Float:Angle);
foreach(Player,i)
{
switch(GetPlayerSkin(i))
{
case NON_IMMUNE,163,70:
{
if(GetDistanceBetweenPlayers(playerid,i) < 6.0)
{
GetClosestPlayer(i);
GetPlayerFacingAngle(i,Float:Angle);
GetPlayerVelocity(i,Float:x,Float:y,Float:z);
SetPlayerVelocity(i,Float:x+0.3,Float:y+0.3,Float:z+0.2);
SetPlayerFacingAngle(i,Float:Angle);
GivePlayerXP(playerid,10);
Abilitys[playerid][StomperPushing] = gettime();
}
}
}
}
}
}
}
}
set velocity for victim ,, and u dont need any ability
Make It in OnPlayerGiveDamage , if u.not understand reply me,, i will make for u,,, |
if(team[issuerid] == TEAM_ZOMBIE) { if(pInfo[issuerid][pZombieClass] == Yourclass) { if(team[playerid] == TEAM_HUMAN) { if(weaponid == 9) { new Float: x,Float:y,Float:z,Float:angle; GetPlayerFacingAngle(playerid,Float:angle); GetPlayerVelocity(playerid,Float:x,Float:y,Float:z ); SetPlayerVelocity(playerid,Float:x+0.8,Float:y,Flo at:z+0.8); //// set your own velocity which u want SetPlayerFacingAngle(playerid,Float:angle); } } } } |