Infected Will this work
#1

Solved
Reply
#2

any help?
Reply
#3

Why don't you test it? I'll be glad to help if you need a partner.
Reply
#4

It will infect the person who clicks.
Reply
#5

you will have to be on the zombie team and have a knife to become infected

what are you trying to do? infect the person that gets stabbed?
Reply
#6

Quote:
Originally Posted by (SF)Noobanatior
Посмотреть сообщение
you will have to be on the zombie team and have a knife to become infected

what are you trying to do? infect the person that gets stabbed?
Yes exactly what im trying to do
Reply
#7

Would work on strtok I think.
IsPlayerInRangeOfPoint (The player that will be stabbed or playerid2) then get your pos GetPlayerPos
I think...
Reply
#8

Solved
Reply
#9

Well I never really learned strtok. But here's a concept :

pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(cTeam[playerid] == ZOMBIE)
        if(newkeys & KEY_FIRE)
        {
            if(GetPlayerWeapon(playerid) == 4)
            {
                new Float:x, Float:y, Float:z;
                GetPlayerPos(playerid, x, y, z);
                if(IsPlayerInRangeOfPoint(playerid2, x+2, y+2, z)) return Infected(playerid2);
                return 1;
            }

        }

    return 1;
}
Just use strtok for the detection of playerid2
Reply
#10

its tricky to see what player is attacking who b4 they die
so you would need to check for players that are real close and if there health changes when you stab them,then infect them

something like
Код:
new float:zx,float:zy,float:zz;
GetPlayerPoz(playerid,zx,zy,zz);
for new(z=0;z<MAX_PLAYERS,z++){
 if(!IsPlayerConnected(z))continue;
 if(IsPlayerInRangeOfPoint(z,zx,zy,zz){
  GetPlayerHealth(z,zh[playerid]);
 }
}
then check in a few seconds if the health has gone down if so infect them

an easer way to do it would be if you just infect them if there health is low and they are near you would have pretty much the same effect

^^^^NOT WORKING CODE just a example
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)