01.11.2015, 12:34
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:
OnPlayerPickUpPickup:
/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;
}
pawn Код:
if(pickupid == CookiePickup)
{
PlayerInfo[playerid][pCookie] += 1;
SendClientMessage(playerid, COLOR_LIGHTRED, "* You picked up 1 cookie.");
return 1;
}