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


Messages In This Thread
Zombie Pickups problem - by Sanady - 28.08.2012, 10:40
Re: Zombie Pickups problem - by Youice - 28.08.2012, 10:54
Re: Zombie Pickups problem - by Sanady - 28.08.2012, 10:58
Re: Zombie Pickups problem - by Lordzy - 28.08.2012, 11:03
Re: Zombie Pickups problem - by Sanady - 28.08.2012, 11:14

Forum Jump:


Users browsing this thread: 1 Guest(s)