Zombie class
#1

Hello, guys, so i`m struggling at some zombie classes, the bugged ones, and its pretty hard for me since i`m not that old in this domain (Scripting samp) at a higher level, so i have this one here.
PHP Code:
if(PRESSED(KEY_WALK))
    {
        if(
team[playerid] == TEAM_ZOMBIE)
        {
            if(
pInfo[playerid][pZombieClass] == SLENDER)
            {
                new 
Float:pzFloat:xFloat:yFloat:z;
                new 
targetid GetClosestPlayer(playerid);
                
GetPlayerFacingAngle(playeridpz);
                
GetPlayerPos(playeridFloat:xFloat:yFloat:z);
                if(
GetDistanceBetweenPlayers(playerid,targetid) < 10.0)
                {
                    if(
gettime() - 15 Abilitys[playerid][TeleportBlack]) return GameTextForPlayer(playerid,"~r~ You must wait 15 seconds",1000,5);
                    {
                        if(
team[targetid] == TEAM_HUMAN)
                        {
                            
GivePlayerXP(playerid,25);
                            
Abilitys[playerid][TeleportBlack] = gettime();
                            
SendClientMessage(playerid,COLOR_GREEN,"You have teleported to your target and you scared him");
                            
SetPlayerPos(playerid,Float:x,Float:y,Float:z);
                            
ApplyAnimation(targetid"CRACK""crckdeth2"4.010000);
                            
ApplyAnimation(targetid"CRACK""crckdeth2"4.010000); //Apply it twice!
                            
TogglePlayerControllable(targetid0);
                            
SetTimerEx("ClearAnims"20000"i"targetid);
                            new 
nemesisstring[128];
                            
format(nemesisstring,sizeof(nemesisstring),""chat" You have been attacked by Slender %s",PlayerName(playerid));
                            
SendClientMessage(targetid,-1,nemesisstring);
                        }
                    }
                }
            }
        }
    } 
What i want to make? Well, when i press the KEY_WALK, it should teleport the player (that has this class) to the closes target, applying the CRACK animation + his screen turn black, I just cant figure it out.. If its too much what i ask, just ignore it, I don`t want you guys to struggle for me.
Reply
#2

bump
Reply
#3

So what errors are you getting?
Reply
#4

Quote:
Originally Posted by Jaxium
View Post
So what errors are you getting?
There is no error, i want to make that class to teleport to the nearest human and blinding him (Making his screen black)
Reply
#5

Well, it's pretty easy. I recommend you to ask Sarcasm on your forums. He is a friend of mine and probably he can fix it.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)