OnPlayerPickUpPickup
#1

Hi, i've been making a cookie system, and /dropcookie will create a pickup, and when you pickup the cookie pickup it should add a "cookie" to your /stats, but it only Works on the first cookie i drop. Let's say i type /dropcookie three times, and it will create three pickups, but it will only give me a cookie on the first one i pick up.

/dropcookie command:
pawn Код:
if (strcmp(cmd, "/dropcookie", true) == 0)
    {
        new Float:X,Float:Y,Float:Z;
        GetPlayerPos(playerid, X, Y, Z);
        CookiePickup = CreatePickup(1276, 19, X, Y, Z, -1);
        SendClientMessage(playerid, COLOR_RCON,"  You have placed a cookie on the ground.");
        return 1;
    }
OnPlayerPickUpPickup:
pawn Код:
if(pickupid == CookiePickup)
    {
        PlayerInfo[playerid][pCookie] += 1;
        SendClientMessage(playerid, COLOR_LIGHTRED, "* You picked up 1 cookie.");
        return 1;
    }
Reply


Messages In This Thread
OnPlayerPickUpPickup - by Mikkel_RE - 01.11.2015, 12:34
Re: OnPlayerPickUpPickup - by prineside - 01.11.2015, 13:07
Re: OnPlayerPickUpPickup - by Mikkel_RE - 01.11.2015, 13:13
Re: OnPlayerPickUpPickup - by JaKe Elite - 01.11.2015, 13:15
Re: OnPlayerPickUpPickup - by Mikkel_RE - 01.11.2015, 13:18
Re: OnPlayerPickUpPickup - by prineside - 01.11.2015, 13:25
Re: OnPlayerPickUpPickup - by Mikkel_RE - 01.11.2015, 14:03
Re: OnPlayerPickUpPickup - by Mikkel_RE - 01.11.2015, 14:18
Re: OnPlayerPickUpPickup - by prineside - 01.11.2015, 14:23

Forum Jump:


Users browsing this thread: 1 Guest(s)