Please help with the class!
#1

Hello! I'm currently creating a zombie class which will be like ''Tanker'' and it's ability is to stomp any near player away. I have this hunter class, but it doesn't have to interact with other players, because it jumps and Tanker has to like punch a player.


Here is how hunter class works:

PHP код:
if(Key(KEY_JUMP) && gTeam[playerid] == gZOMBIE && PlayerInfo[playerid][gSpecialZed] == zedHUNTER && g_GlobalStatus == e_Status_Playing)
    {
        new 
tick GetTickCount() + 3600000;
        if((
PlayerInfo[playerid][tickLastJump] + COOLDOWN_JUMP) >= tick)
        {
            return 
1;
        }
        new 
Float:POS[3];
        
GetPlayerVelocity(playeridPOS[0], POS[1], POS[2]);
        
SetPlayerVelocity(playeridPOS[0], POS[1], floatadd(POS[2], 1.5));
        
PlayerInfo[playerid][tickLastJump] = tick;
    } 
Basically I need a help with Velocity position coordinates and the target player. Any help is very appreciated. Thank you!


Please note, that this is not an ordinary zombie apocalypse script and I am scripting a different one, so I don't want to copy-paste.
Reply
#2

A stomp, so players around the "tanker" are pushed back?

For finding the targets you need to loop through the players and check if they are in range of the stomp
For the push back you set the targets velocity in the correct direction (away from "tanker")
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)