SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 19/03/2018, 12:33 PM   #1
Graphyt
Little Clucker
 
Join Date: Mar 2018
Posts: 15
Reputation: 0
Default Zombie class

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.
Graphyt is offline   Reply With Quote
Old 20/03/2018, 10:38 AM   #2
Graphyt
Little Clucker
 
Join Date: Mar 2018
Posts: 15
Reputation: 0
Default Re: [HELP] Zombie class

bump
Graphyt is offline   Reply With Quote
Old 20/03/2018, 01:58 PM   #3
Jaxium
Little Clucker
 
Join Date: Nov 2017
Location: Egypt
Posts: 11
Reputation: 1
Default Re: [HELP] Zombie class

So what errors are you getting?
Jaxium is offline   Reply With Quote
Old 20/03/2018, 02:40 PM   #4
Graphyt
Little Clucker
 
Join Date: Mar 2018
Posts: 15
Reputation: 0
Default Re: [HELP] Zombie class

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)
Graphyt is offline   Reply With Quote
Old 19/04/2018, 01:21 PM   #5
Istrator
Big Clucker
 
Join Date: Dec 2017
Posts: 50
Reputation: 0
Default Re: [HELP] Zombie class

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.
Istrator is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[ajuda] selecionar class Zombie basico=) gabriel_matador PortuguÍs/Portuguese 23 18/04/2012 02:52 AM


All times are GMT. The time now is 12:56 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.