01.11.2015, 14:23
PHP код:
public OnPlayerPickUpPickup( playerid, pickupid ) {
for ( new i=0; i<MAX_COOKIES; i++ ) {
if ( pickupid == cookiePickups[ i ]) {
PlayerInfo[playerid][pCookie] += 1;
SendClientMessage(playerid, COLOR_LIGHTRED, "* You picked up 1 cookie.");
// Add this vvv
DestroyPickup( pickupid );
cookiePickups[ i ] = -1;
return 1;
}
}
SendClientMessage(playerid, COLOR_ERROR, "* That was not a cookie...");
return 1;
}