Zombie Pickups problem
#1

Hello.I made something new in my server.But it`s not working....When zombie kill survivor.Pickup will create just for zombies.But problem is in that pickup will create for everybody.Also when zombie enter to pickup it won`t get XP just they get nothing.How to fix it?Createpickup just for zombies.And when zombie enter to pickup to get XP?

code:
pawn Код:
new meso;

public OnPlayerDeath(playerid, killerid, reason)
{
        if(gPlayerClass[killerid] == CZOMBIE)
        {
            new Float:X,Float:Y,Float:Z;
            GetPlayerPos(playerid,X,Y,Z);
            if(GetPlayerTeam(killerid) == 2)
            {
                meso = CreatePickup(2804,2,X,Y,Z,-1);
            }
        }
        return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickup == meso)
    {
        if(GetPlayerTeam(playerid) == 2)
        {
            GameTextForPlayer(playerid,"+20",5000,4);
            UserStats[playerid][Exp] += 20;
        }
    }
    return 1;
}
Reply
#2

try this:

pawn Код:
public OnPlayerUpdate(playerid)
{
    if(GetPlayerTeam(playerid) == 1)//change it to humans team
    {
        DestroyPickup(meso);
    }
    return 1;
}
Edit: try to add a command that checks the team, you might be (ig) something else not team "2"
Reply
#3

Quote:
Originally Posted by Youice
Посмотреть сообщение
try this:

pawn Код:
public OnPlayerUpdate(playerid)
{
    if(GetPlayerTeam(playerid) == 1)//change it to humans team
    {
        DestroyPickup(meso);
    }
    return 1;
}
Edit: try to add a command that checks the team, you might be (ig) something else not team "2"
It`s still not working anyone else?
Reply
#4

Try this
pawn Код:
new meso;

public OnPlayerDeath(playerid, killerid, reason)
{
        if(gPlayerClass[killerid] == CZOMBIE)
        {
            new Float:X,Float:Y,Float:Z;
            GetPlayerPos(playerid,X,Y,Z);
            if(GetPlayerTeam(killerid) == 2)
            {
                meso = CreatePickup(2804,2,X,Y,Z,-1);
            }
        }
        return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickup == meso)
    {
        if(GetPlayerTeam(playerid) == 2)
        {
            GameTextForPlayer(playerid,"+20",5000,4);
            UserStats[playerid][Exp] + 20;
        }
    }
    return 1;
}
Reply
#5

Quote:
Originally Posted by [xB]Lordz
Посмотреть сообщение
Try this
pawn Код:
new meso;

public OnPlayerDeath(playerid, killerid, reason)
{
        if(gPlayerClass[killerid] == CZOMBIE)
        {
            new Float:X,Float:Y,Float:Z;
            GetPlayerPos(playerid,X,Y,Z);
            if(GetPlayerTeam(killerid) == 2)
            {
                meso = CreatePickup(2804,2,X,Y,Z,-1);
            }
        }
        return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickup == meso)
    {
        if(GetPlayerTeam(playerid) == 2)
        {
            GameTextForPlayer(playerid,"+20",5000,4);
            UserStats[playerid][Exp] + 20;
        }
    }
    return 1;
}
Sorry but this is not working (( anyone else??
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)